pub mod handlers;
pub mod mirror;
mod pack;
pub mod vocab;
use khive_runtime::KhiveRuntime;
use khive_types::{HandlerDef, Pack, PackSchemaPlan};
pub(crate) use vocab::{SESSION_HANDLERS, SESSION_SCHEMA_PLAN_STMTS};
pub struct SessionPack {
runtime: KhiveRuntime,
}
impl Pack for SessionPack {
const NAME: &'static str = "session";
const NOTE_KINDS: &'static [&'static str] = &["session"];
const ENTITY_KINDS: &'static [&'static str] = &[];
const HANDLERS: &'static [HandlerDef] = &SESSION_HANDLERS;
const REQUIRES: &'static [&'static str] = &["kg"];
const SCHEMA_PLAN: Option<PackSchemaPlan> = Some(PackSchemaPlan {
pack: "session",
statements: &SESSION_SCHEMA_PLAN_STMTS,
});
}
impl SessionPack {
pub fn new(runtime: KhiveRuntime) -> Self {
Self { runtime }
}
pub(crate) fn runtime(&self) -> &KhiveRuntime {
&self.runtime
}
}