Versions in this module Expand all Collapse all v0 v0.1.1 May 26, 2026 v0.1.0 May 25, 2026 Changes in this version + var ErrDomainNotFound = errors.New("store: domain not found") + var ErrDomainTaken = errors.New("store: domain host taken") + var ErrNotFound = errors.New("page not found") + var ErrPathConflict = errors.New("page path conflict") + var ErrTenantNotFound = errors.New("store: tenant not found") + var ErrTenantSlugTaken = errors.New("store: tenant slug taken") + type Domain struct + Host string + ID int64 + Kind string + SubsiteLabel string + TenantID int64 + type MemoryPageStore struct + func NewMemoryPageStore() *MemoryPageStore + func (s *MemoryPageStore) Create(_ context.Context, tenantID int64, p *Page) error + func (s *MemoryPageStore) Delete(_ context.Context, tenantID, id int64) error + func (s *MemoryPageStore) Get(_ context.Context, tenantID, id int64) (*Page, error) + func (s *MemoryPageStore) GetByPath(_ context.Context, tenantID int64, subsite, path string) (*Page, error) + func (s *MemoryPageStore) List(_ context.Context, tenantID int64, subsite string) ([]*Page, error) + func (s *MemoryPageStore) Update(_ context.Context, tenantID int64, p *Page) error + type MemoryTenantAdminStore struct + func NewMemoryTenantAdminStore() *MemoryTenantAdminStore + func (s *MemoryTenantAdminStore) CreateDomain(_ context.Context, d *Domain) error + func (s *MemoryTenantAdminStore) CreateTenant(_ context.Context, t *Tenant) error + func (s *MemoryTenantAdminStore) DeleteDomain(_ context.Context, tenantID, id int64) error + func (s *MemoryTenantAdminStore) DeleteTenant(_ context.Context, id int64) error + func (s *MemoryTenantAdminStore) GetTenant(_ context.Context, id int64) (*Tenant, error) + func (s *MemoryTenantAdminStore) ListDomains(_ context.Context, tenantID int64) ([]*Domain, error) + func (s *MemoryTenantAdminStore) ListTenants(_ context.Context) ([]*Tenant, error) + func (s *MemoryTenantAdminStore) UpdateTenant(_ context.Context, t *Tenant) error + type Page struct + BodyBlocks json.RawMessage + BodyHTML string + CreatedAt time.Time + ID int64 + Path string + Status PageStatus + Subsite string + TenantID int64 + Title string + UpdatedAt time.Time + Version int + func (p *Page) Validate() error + type PageStatus string + const StatusDraft + const StatusPublished + type PageStore interface + Create func(ctx context.Context, tenantID int64, p *Page) error + Delete func(ctx context.Context, tenantID int64, id int64) error + Get func(ctx context.Context, tenantID int64, id int64) (*Page, error) + GetByPath func(ctx context.Context, tenantID int64, subsite, path string) (*Page, error) + List func(ctx context.Context, tenantID int64, subsite string) ([]*Page, error) + Update func(ctx context.Context, tenantID int64, p *Page) error + type Tenant struct + CreatedAt time.Time + ID int64 + Label string + Slug string + ThemeID string + UpdatedAt time.Time + type TenantAdminStore interface + CreateDomain func(ctx context.Context, d *Domain) error + CreateTenant func(ctx context.Context, t *Tenant) error + DeleteDomain func(ctx context.Context, tenantID, id int64) error + DeleteTenant func(ctx context.Context, id int64) error + GetTenant func(ctx context.Context, id int64) (*Tenant, error) + ListDomains func(ctx context.Context, tenantID int64) ([]*Domain, error) + ListTenants func(ctx context.Context) ([]*Tenant, error) + UpdateTenant func(ctx context.Context, t *Tenant) error