Versions in this module Expand all Collapse all v0 v0.2.1 Sep 26, 2026 Changes in this version type DB + func (db *DB) SessionService(tenantID string) *SessionService + type SessionService struct + func (s *SessionService) AppendEvent(ctx context.Context, params store.AppendEventParams) (*store.SessionEvent, error) + func (s *SessionService) CreateSession(ctx context.Context, params store.CreateSessionParams) (*store.AgentSession, error) + func (s *SessionService) DeleteSession(ctx context.Context, params store.DeleteSessionParams) error + func (s *SessionService) GetAppState(ctx context.Context, tenantID, appName string) (map[string]any, error) + func (s *SessionService) GetSession(ctx context.Context, params store.GetSessionParams) (*store.AgentSession, error) + func (s *SessionService) GetUserState(ctx context.Context, tenantID, appName, userID string) (map[string]any, error) + func (s *SessionService) ListEventsAfter(ctx context.Context, params store.ListEventsAfterParams) ([]store.SessionEvent, error) + func (s *SessionService) ListSessions(ctx context.Context, params store.ListSessionsParams) ([]store.SessionSummary, error) v0.2.0 Sep 22, 2026 Changes in this version + type AuditStore struct + func (s *AuditStore) Append(ctx context.Context, record store.AuditRecord) error + func (s *AuditStore) List(ctx context.Context, query store.AuditQuery) ([]store.AuditRecord, error) + type AuthStore struct + func (s *AuthStore) DeleteDevice(ctx context.Context, deviceID string) error + func (s *AuthStore) DeletePolicy(ctx context.Context, name string) error + func (s *AuthStore) DeletePrincipal(ctx context.Context, id string) error + func (s *AuthStore) DeleteRole(ctx context.Context, name string) error + func (s *AuthStore) DeleteTenantBinding(ctx context.Context, principalID string) error + func (s *AuthStore) GetActivePolicy(ctx context.Context) (*store.AuthPolicyRecord, error) + func (s *AuthStore) GetDevice(ctx context.Context, deviceID string) (*store.AuthDeviceRecord, error) + func (s *AuthStore) GetPolicy(ctx context.Context, name string) (*store.AuthPolicyRecord, error) + func (s *AuthStore) GetPrincipal(ctx context.Context, id string) (*store.AuthPrincipalRecord, error) + func (s *AuthStore) GetRole(ctx context.Context, name string) (*store.AuthRoleRecord, error) + func (s *AuthStore) GetTenantBinding(ctx context.Context, principalID string) (*store.AuthTenantBindingRecord, error) + func (s *AuthStore) ListDevices(ctx context.Context) ([]store.AuthDeviceRecord, error) + func (s *AuthStore) ListPolicies(ctx context.Context) ([]store.AuthPolicyRecord, error) + func (s *AuthStore) ListPrincipals(ctx context.Context) ([]store.AuthPrincipalRecord, error) + func (s *AuthStore) ListRoles(ctx context.Context) ([]store.AuthRoleRecord, error) + func (s *AuthStore) ListTenantBindings(ctx context.Context) ([]store.AuthTenantBindingRecord, error) + func (s *AuthStore) Snapshot(ctx context.Context) (*store.AuthSnapshot, error) + func (s *AuthStore) UpsertDevice(ctx context.Context, device store.AuthDeviceRecord) error + func (s *AuthStore) UpsertPolicy(ctx context.Context, policy store.AuthPolicyRecord) error + func (s *AuthStore) UpsertPrincipal(ctx context.Context, principal store.AuthPrincipalRecord) error + func (s *AuthStore) UpsertRole(ctx context.Context, role store.AuthRoleRecord) error + func (s *AuthStore) UpsertTenantBinding(ctx context.Context, binding store.AuthTenantBindingRecord) error + type BinaryStore struct + func (s *BinaryStore) Delete(ctx context.Context, key string) error + func (s *BinaryStore) Get(ctx context.Context, key string) (*store.BinaryObject, error) + func (s *BinaryStore) Put(ctx context.Context, obj store.BinaryObject) error + type BlobMetadataStore struct + func (s *BlobMetadataStore) CreateDownloadSession(ctx context.Context, session binary.DownloadSession) error + func (s *BlobMetadataStore) CreateUploadSession(ctx context.Context, session binary.UploadSession) error + func (s *BlobMetadataStore) DeleteBinaryLink(ctx context.Context, resourceID string) error + func (s *BlobMetadataStore) DeleteDocumentLink(ctx context.Context, documentID string, contentIndex int) error + func (s *BlobMetadataStore) DeleteDownloadSession(ctx context.Context, id string) error + func (s *BlobMetadataStore) DeleteManifest(ctx context.Context, blobID string) error + func (s *BlobMetadataStore) DeleteSyncStatus(ctx context.Context, blobID string) error + func (s *BlobMetadataStore) DeleteUploadSession(ctx context.Context, id string) error + func (s *BlobMetadataStore) GetBinaryLink(ctx context.Context, resourceID string) (*binary.BinaryLink, error) + func (s *BlobMetadataStore) GetDocumentLink(ctx context.Context, documentID string, contentIndex int) (*binary.DocumentAttachmentLink, error) + func (s *BlobMetadataStore) GetDownloadSession(ctx context.Context, id string) (*binary.DownloadSession, error) + func (s *BlobMetadataStore) GetManifest(ctx context.Context, blobID string) (*binary.BlobManifest, error) + func (s *BlobMetadataStore) GetManifestByHash(ctx context.Context, sha256 string) (*binary.BlobManifest, error) + func (s *BlobMetadataStore) GetSyncStatus(ctx context.Context, blobID string) (binary.BlobSyncStatus, error) + func (s *BlobMetadataStore) GetUploadSession(ctx context.Context, id string) (*binary.UploadSession, error) + func (s *BlobMetadataStore) PutBinaryLink(ctx context.Context, link binary.BinaryLink) error + func (s *BlobMetadataStore) PutDocumentLink(ctx context.Context, link binary.DocumentAttachmentLink) error + func (s *BlobMetadataStore) PutManifest(ctx context.Context, manifest binary.BlobManifest) error + func (s *BlobMetadataStore) PutSyncStatus(ctx context.Context, blobID string, status binary.BlobSyncStatus) error + func (s *BlobMetadataStore) UpdateDownloadSession(ctx context.Context, session binary.DownloadSession) error + func (s *BlobMetadataStore) UpdateUploadSession(ctx context.Context, session binary.UploadSession) error + type ChunkBlobStore = SQLiteBlobStore + type ConflictStore struct + func (s *ConflictStore) Append(ctx context.Context, record store.ConflictRecord) error + func (s *ConflictStore) List(ctx context.Context, resourceType, resourceID string) ([]store.ConflictRecord, error) + func (s *ConflictStore) Resolve(ctx context.Context, id string, resolvedAt time.Time) error + type CursorStore struct + func (s *CursorStore) DeleteCursor(ctx context.Context, name string) error + func (s *CursorStore) GetCursor(ctx context.Context, name string) (*store.Cursor, error) + func (s *CursorStore) UpsertCursor(ctx context.Context, cursor store.Cursor) error + type DB struct + func Open(path string, opts ...Option) (*DB, error) + func OpenAndMigrate(ctx context.Context, path string, opts ...Option) (*DB, error) + func (db *DB) ApplyLocalWrite(ctx context.Context, input LocalWrite) (*LocalWriteResult, error) + func (db *DB) AuditStore() *AuditStore + func (db *DB) AuthStore(tenantID string) *AuthStore + func (db *DB) BeginSession(ctx context.Context) (*Session, error) + func (db *DB) BeginWrite(ctx context.Context) (store.WriteSession, error) + func (db *DB) BinaryStore() *BinaryStore + func (db *DB) BlobMetadataStore() *BlobMetadataStore + func (db *DB) ChunkBlobStore() *ChunkBlobStore + func (db *DB) Close() error + func (db *DB) ConflictStore() *ConflictStore + func (db *DB) CursorStore() *CursorStore + func (db *DB) DefinitionStore() *DefinitionStore + func (db *DB) GlobalTerminologyStore() *TerminologyStore + func (db *DB) HistoryStore() *HistoryStore + func (db *DB) InboxStore() *InboxStore + func (db *DB) JobStore() *JobStore + func (db *DB) Migrate(ctx context.Context) error + func (db *DB) ModuleStore() *ModuleStore + func (db *DB) OutboxStore() *OutboxStore + func (db *DB) PackageInstallStore() *PackageInstallStore + func (db *DB) RegistryInstallStore() *RegistryInstallStore + func (db *DB) ResourceStore() *ResourceStore + func (db *DB) SQL() *sql.DB + func (db *DB) SQLiteBlobStore() *SQLiteBlobStore + func (db *DB) SearchStore() *SearchStore + func (db *DB) SubscriptionDeliveryStore() *SubscriptionDeliveryStore + func (db *DB) SubscriptionStore() *SubscriptionStore + func (db *DB) TerminologyInstallStore(tenantID string) *TerminologyInstallStore + func (db *DB) TerminologyStore() *TerminologyStore + type DefinitionStore struct + func (s *DefinitionStore) Delete(ctx context.Context, canonicalURL, version string) error + func (s *DefinitionStore) Get(ctx context.Context, canonicalURL, version string) (*store.DefinitionResourceRecord, error) + func (s *DefinitionStore) List(ctx context.Context, filter store.DefinitionFilter) ([]store.DefinitionResourceRecord, error) + func (s *DefinitionStore) Upsert(ctx context.Context, record store.DefinitionResourceRecord, ...) error + type HistoryStore struct + func (s *HistoryStore) AppendVersion(ctx context.Context, version store.ResourceVersion) error + func (s *HistoryStore) GetHistory(ctx context.Context, resourceType, id string) ([]store.ResourceVersion, error) + func (s *HistoryStore) GetVersion(ctx context.Context, resourceType, id, versionID string) (store.ResourceVersion, error) + type InboxStore struct + func (s *InboxStore) AppliedAt(ctx context.Context, id string) (*time.Time, error) + func (s *InboxStore) GetAckPayload(ctx context.Context, id string) ([]byte, bool, error) + func (s *InboxStore) IsApplied(ctx context.Context, id string) (bool, error) + func (s *InboxStore) MarkApplied(ctx context.Context, id string, appliedAt time.Time) error + func (s *InboxStore) MarkAppliedWithPayload(ctx context.Context, id string, payload []byte, appliedAt time.Time) error + type JobStore struct + func (s *JobStore) ClaimNext(ctx context.Context, jobType string) (*store.JobRecord, error) + func (s *JobStore) Delete(ctx context.Context, id string) error + func (s *JobStore) Enqueue(ctx context.Context, job store.JobRecord) error + func (s *JobStore) Get(ctx context.Context, id string) (*store.JobRecord, error) + func (s *JobStore) Update(ctx context.Context, job store.JobRecord) error + func (s *JobStore) UpdateIf(ctx context.Context, job store.JobRecord, expectedUpdatedAt time.Time) (bool, error) + type LocalWrite struct + Action store.VersionAction + Event store.ResourceEvent + Resource *types.ResourceEnvelope + SearchEntries []store.SearchIndexEntry + Version store.ResourceVersion + type LocalWriteResult struct + Event store.ResourceEvent + Version store.ResourceVersion + type ModuleStore struct + func (s *ModuleStore) Get(ctx context.Context, name string) (*store.ModuleRecord, error) + func (s *ModuleStore) List(ctx context.Context) ([]store.ModuleRecord, error) + func (s *ModuleStore) Register(ctx context.Context, module store.ModuleRecord) error + func (s *ModuleStore) Unregister(ctx context.Context, name string) error + type Option func(*options) + func WithBusyTimeout(d time.Duration) Option + type OutboxStore struct + func (s *OutboxStore) Append(ctx context.Context, event store.ResourceEvent) (store.ResourceEvent, error) + func (s *OutboxStore) LatestForResource(ctx context.Context, resourceType, id string) (*store.ResourceEvent, error) + func (s *OutboxStore) ReadSince(ctx context.Context, afterSequence int64, limit int) ([]store.ResourceEvent, error) + type PackageInstallStore struct + func (s *PackageInstallStore) IsComplete(ctx context.Context, packageName, packageVersion string) (bool, error) + func (s *PackageInstallStore) MarkComplete(ctx context.Context, packageName, packageVersion string, completedAt time.Time) error + type RegistryInstallStore struct + func (s *RegistryInstallStore) Delete(ctx context.Context, filter store.RegistryInstallFilter) error + func (s *RegistryInstallStore) ListEnabled(ctx context.Context) ([]store.RegistryInstallRecord, error) + func (s *RegistryInstallStore) ListInstalled(ctx context.Context, filter store.RegistryInstallFilter) ([]store.RegistryInstallRecord, error) + func (s *RegistryInstallStore) SetEnabled(ctx context.Context, record store.RegistryInstallRecord) error + func (s *RegistryInstallStore) UpsertInstall(ctx context.Context, record store.RegistryInstallRecord) error + type ResourceStore struct + func (s *ResourceStore) Create(ctx context.Context, res *types.ResourceEnvelope) error + func (s *ResourceStore) Delete(ctx context.Context, resourceType, id string) error + func (s *ResourceStore) DeleteIfVersion(ctx context.Context, resourceType, id, expectedVersion string) (bool, error) + func (s *ResourceStore) Exists(ctx context.Context, resourceType, id string) (bool, error) + func (s *ResourceStore) ListIDs(ctx context.Context, resourceType string, limit, offset int) ([]string, error) + func (s *ResourceStore) Read(ctx context.Context, resourceType, id string) (*types.ResourceEnvelope, error) + func (s *ResourceStore) Update(ctx context.Context, res *types.ResourceEnvelope) error + func (s *ResourceStore) UpdateIfVersion(ctx context.Context, res *types.ResourceEnvelope, expectedVersion string) (bool, error) + type SQLiteBlobStore struct + func (s *SQLiteBlobStore) AppendChunk(ctx context.Context, key string, index int, data []byte) error + func (s *SQLiteBlobStore) Delete(ctx context.Context, blobID string) error + func (s *SQLiteBlobStore) DeleteChunks(ctx context.Context, key string) error + func (s *SQLiteBlobStore) Get(ctx context.Context, blobID string) ([]byte, *binary.BlobDescriptor, error) + func (s *SQLiteBlobStore) Head(ctx context.Context, blobID string) (*binary.BlobDescriptor, error) + func (s *SQLiteBlobStore) ListChunkCount(ctx context.Context, key string) (int, error) + func (s *SQLiteBlobStore) Metadata() *BlobMetadataStore + func (s *SQLiteBlobStore) Open(ctx context.Context, blobID string) (io.ReadCloser, *binary.BlobDescriptor, error) + func (s *SQLiteBlobStore) Put(ctx context.Context, blobID string, data []byte, contentType string) (*binary.BlobDescriptor, error) + func (s *SQLiteBlobStore) PutStream(ctx context.Context, blobID string, r io.Reader, size int64, ...) (*binary.BlobDescriptor, error) + func (s *SQLiteBlobStore) ReadChunk(ctx context.Context, key string, index int) ([]byte, error) + type SearchStore struct + func (s *SearchStore) FieldValues(ctx context.Context, resourceType, fieldKey string, resourceIDs []string) (map[string]string, error) + func (s *SearchStore) Index(ctx context.Context, entry store.SearchIndexEntry) error + func (s *SearchStore) Lookup(ctx context.Context, key, value string) ([]string, error) + func (s *SearchStore) LookupMatch(ctx context.Context, match store.SearchMatch) ([]string, error) + func (s *SearchStore) QueryPrepared(ctx context.Context, query store.PreparedQuery, args map[string]string) ([]string, error) + func (s *SearchStore) RemoveIndex(ctx context.Context, resourceType, id string) error + type Session struct + func (s *Session) BinaryMetadataStore() binary.MetadataStore + func (s *Session) Commit(ctx context.Context) error + func (s *Session) CursorStore() store.CursorStore + func (s *Session) EventStore() store.EventStore + func (s *Session) HistoryStore() store.HistoryStore + func (s *Session) InboxStore() store.InboxStore + func (s *Session) OutboxStore() store.EventStore + func (s *Session) ResourceStore() store.ResourceStore + func (s *Session) Rollback(ctx context.Context) error + func (s *Session) SearchStore() store.SearchStore + func (s *Session) TerminologyStore() store.TerminologyStore + type SubscriptionDeliveryStore struct + func (s *SubscriptionDeliveryStore) Append(ctx context.Context, record store.DeliveryRecord) error + func (s *SubscriptionDeliveryStore) Get(ctx context.Context, id string) (*store.DeliveryRecord, error) + func (s *SubscriptionDeliveryStore) List(ctx context.Context, query store.DeliveryListQuery) ([]store.DeliveryRecord, error) + func (s *SubscriptionDeliveryStore) Update(ctx context.Context, record store.DeliveryRecord) error + type SubscriptionStore struct + func (s *SubscriptionStore) Create(ctx context.Context, record store.SubscriptionRecord) error + func (s *SubscriptionStore) Delete(ctx context.Context, id string) error + func (s *SubscriptionStore) Get(ctx context.Context, id string) (*store.SubscriptionRecord, error) + func (s *SubscriptionStore) List(ctx context.Context, query store.SubscriptionListQuery) ([]store.SubscriptionRecord, error) + func (s *SubscriptionStore) Update(ctx context.Context, record store.SubscriptionRecord) error + type TerminologyInstallStore struct + func (s *TerminologyInstallStore) Delete(ctx context.Context, filter store.TerminologyInstallFilter) error + func (s *TerminologyInstallStore) ListEnabled(ctx context.Context) ([]store.TerminologyInstallRecord, error) + func (s *TerminologyInstallStore) ListInstalled(ctx context.Context, filter store.TerminologyInstallFilter) ([]store.TerminologyInstallRecord, error) + func (s *TerminologyInstallStore) SetEnabled(ctx context.Context, record store.TerminologyInstallRecord) error + func (s *TerminologyInstallStore) UpsertInstall(ctx context.Context, record store.TerminologyInstallRecord) error + type TerminologyInstallStoreFactory struct + func NewTerminologyInstallStoreFactory(db *DB) *TerminologyInstallStoreFactory + func (f *TerminologyInstallStoreFactory) ForTenant(_ context.Context, tenantID string) (store.TerminologyInstallStore, error) + type TerminologyStore struct + func (s *TerminologyStore) DeleteProjections(ctx context.Context, scope, typ, url, ver string) error + func (s *TerminologyStore) DeleteResource(ctx context.Context, scope, typ, url, ver string) error + func (s *TerminologyStore) FindResource(ctx context.Context, scope, typ, url, ver string) (*store.TerminologyResourceRecord, error) + func (s *TerminologyStore) GetValueSet(ctx context.Context, scope, url, ver string) (*store.TerminologyValueSetRecord, error) + func (s *TerminologyStore) ListResources(ctx context.Context, scope, typ string) ([]store.TerminologyResourceRecord, error) + func (s *TerminologyStore) ListValueSetMembers(ctx context.Context, scope, url, ver string) ([]store.TerminologyExpansionMemberRecord, error) + func (s *TerminologyStore) LookupConcept(ctx context.Context, scope, url, ver, code string) (*store.TerminologyConceptRecord, error) + func (s *TerminologyStore) PutResource(ctx context.Context, r store.TerminologyResourceRecord) error + func (s *TerminologyStore) ReplaceCodeSystem(ctx context.Context, scope, url, ver string, ...) error + func (s *TerminologyStore) ReplaceValueSet(ctx context.Context, r store.TerminologyValueSetRecord, ...) error