Versions in this module Expand all Collapse all v0 v0.136.0 Oct 28, 2026 v0.135.0 Oct 28, 2026 Changes in this version + var ErrConflict = errors.New("catalog: conflict") + var ErrEventCursorExpired = errors.New("catalog: event cursor expired; resync current state") + var ErrEventCursorInvalid = errors.New("catalog: invalid event cursor") + var ErrForbidden = errors.New("catalog: forbidden") + var ErrInvalid = errors.New("catalog: invalid request") + var ErrNotFound = errors.New("catalog: not found") + func DefaultVersion(vs []catalog.Version, language string) *catalog.Version + func ImageRef(name string) string + func InitializeFixedOwners(ctx context.Context, pool *pgxpool.Pool, schema, tenant string, ...) error + func QueueFor(cat string) string + type CreateAuthorization struct + func (a *CreateAuthorization) CreateTx(ctx context.Context, tx pgx.Tx, in []catalog.ContentInput) ([]string, error) + type Entities interface + Cards func(ctx context.Context, ids []entities.EntityID, o entitystore.CardOptions) ([]entities.EntityCard, error) + EffectiveEntities func(ctx context.Context, q entitystore.Querier, versionIDs []string) (map[string][]string, error) + type Media struct + Reader catalog.Reader + Registry *mediastore.Registry + Versions VersionMedia + type Options struct + AfterPurge func(context.Context) error + Auth auth.Authenticator + Body catalog.Sanitizer + Channels *channelstore.Store + DeletedRetention time.Duration + DocumentsChanged func(ctx context.Context, q Querier) error + Entities Entities + EventRetention time.Duration + Gate *entitlement.Gate + Kinds kinds.Config + Logger *slog.Logger + Now func() time.Time + OnPurge func(context.Context, pgx.Tx, []contentref.ContentRef) error + Pool *pgxpool.Pool + Schema string + Tenant string + type PublicationScheduler interface + SchedulePublicationTx func(context.Context, pgx.Tx, []versions.Target) error + type Querier interface + Exec func(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error) + Query func(ctx context.Context, sql string, args ...any) (pgx.Rows, error) + QueryRow func(ctx context.Context, sql string, args ...any) pgx.Row + type Store struct + func New(ctx context.Context, opts Options) (*Store, error) + func (s *Store) BindMedia(m Media) error + func (s *Store) BindPublication(p PublicationScheduler) error + func (s *Store) BindStanding(st catalog.Standing) + func (s *Store) BodyImage(ctx context.Context, actor access.Actor, contentID string, ...) (catalog.InlineImage, error) + func (s *Store) BuildDocuments(ctx context.Context, kind, language string, refs []contentref.ContentRef) ([]search.KeywordDocument, error) + func (s *Store) Close() + func (s *Store) CompletePublicationTx(ctx context.Context, tx pgx.Tx, target versions.Target, at time.Time) error + func (s *Store) ContentChanged(ctx context.Context, q entitystore.Querier, contentIDs []string) error + func (s *Store) Contents(ctx context.Context, v *Viewer, ids []string) ([]*catalog.Content, error) + func (s *Store) CountManaged(ctx context.Context, actor access.Actor, q catalog.ManageQuery) (catalog.ManageCount, error) + func (s *Store) Create(ctx context.Context, actor access.Actor, in []catalog.ContentInput) ([]string, error) + func (s *Store) DeleteOwned(ctx context.Context, entities []string) error + func (s *Store) DeleteRepost(ctx context.Context, actor access.Actor, destination, contentID string) error + func (s *Store) DeleteVersions(ctx context.Context, actor access.Actor, keys []catalog.VersionKey) error + func (s *Store) DocumentKinds() []string + func (s *Store) EntitiesChanged(ctx context.Context, q entitystore.Querier, changes []entities.Change) error + func (s *Store) EntitiesRenamed(ctx context.Context, q entitystore.Querier, entityIDs []string) error + func (s *Store) EventReader() eventlog.Reader + func (s *Store) ExpandDocuments(ctx context.Context, limit int) (bool, error) + func (s *Store) Handler() http.Handler + func (s *Store) Import(ctx context.Context, tx pgx.Tx, in []catalog.ImportContent) error + func (s *Store) ImportDeletes(ctx context.Context, tx pgx.Tx, contents, versions []string) error + func (s *Store) ListDocuments(ctx context.Context, kind, language, cursor string, limit int) ([]contentref.ContentRef, string, bool, error) + func (s *Store) ListEvents(ctx context.Context, query catalog.EventQuery) (catalog.EventPage, error) + func (s *Store) LookupVersion(ctx context.Context, viewer *Viewer, versionID string) (*catalog.Content, error) + func (s *Store) Manage(ctx context.Context, actor access.Actor, q catalog.ManageQuery) ([]string, error) + func (s *Store) ManagementSearch(ctx context.Context, actor access.Actor, q catalog.ManagementSearchQuery) (catalog.ManagementNames, error) + func (s *Store) OrderVersions(ctx context.Context, actor access.Actor, contentID string, ids []string) error + func (s *Store) PrepareCreate(ctx context.Context, actor access.Actor, in []catalog.ContentInput) (*CreateAuthorization, error) + func (s *Store) PruneEvents(ctx context.Context) (int, error) + func (s *Store) PublicationCompletedTx(ctx context.Context, tx pgx.Tx, target versions.Target, requestID string, ...) error + func (s *Store) Publish(ctx context.Context, actor access.Actor, in []catalog.Publish) error + func (s *Store) PurgeDeleted(ctx context.Context) (total int, resultErr error) + func (s *Store) PutRepost(ctx context.Context, actor access.Actor, destination, contentID, host string) (channels.Repost, error) + func (s *Store) PutVersions(ctx context.Context, actor access.Actor, in []catalog.VersionPut) ([]string, error) + func (s *Store) ReconcileFacets(ctx context.Context) (int, error) + func (s *Store) Ref(kind, id string) contentref.ContentRef + func (s *Store) RefreshFacets(ctx context.Context, q Querier, contentIDs []string) error + func (s *Store) RefreshPaths(ctx context.Context) (int, error) + func (s *Store) RefreshTx(ctx context.Context, tx pgx.Tx, versionIDs []string) error + func (s *Store) Resolver() resolve.Resolver + func (s *Store) Restore(ctx context.Context, actor access.Actor, ids []string) error + func (s *Store) RestoreOwned(ctx context.Context, entities []string) error + func (s *Store) RiverJobs() riverhelpers.Contribution + func (s *Store) Totals(ctx context.Context, q catalog.TotalsQuery) (catalog.Totals, error) + func (s *Store) Unpublish(ctx context.Context, actor access.Actor, ids []string) error + func (s *Store) Update(ctx context.Context, actor access.Actor, in []catalog.Update) error + func (s *Store) VersionStatuses(ctx context.Context, ids []string) ([]catalog.VersionStatus, error) + func (s *Store) Viewer(ctx context.Context, o catalog.ViewerOptions) (*Viewer, error) + func (s *Store) Visibility(r *http.Request, links []contenturl.Link) ([]contenturl.Visibility, error) + func (s *Store) WithdrawPublicationTx(ctx context.Context, tx pgx.Tx, target versions.Target, hasReleased bool) error + type VersionMedia interface + CheckRestorableTx func(ctx context.Context, tx pgx.Tx, targets []versions.Target) error + Covers func(ctx context.Context, covers []versions.CoverOf) ([][]media.PublicRendition, error) + Delete func(ctx context.Context, targets []versions.Target) error + DeleteTx func(ctx context.Context, tx pgx.Tx, targets []versions.Target) error + ResumeDeletes func(ctx context.Context, limit int) (int, error) + SyncFences func(ctx context.Context, targets []versions.Target) error + type Viewer struct + func (v *Viewer) CanPostToChannel(ctx context.Context, id string) (bool, error) + func (v *Viewer) Editors(ctx context.Context, entities []string) map[string]bool + func (v *Viewer) HiddenContentFilters() map[string][]string + func (v *Viewer) Indexable(alias string) (string, pgx.NamedArgs) + func (v *Viewer) Listed(alias string) (string, pgx.NamedArgs) + func (v *Viewer) Shown(alias string) (string, pgx.NamedArgs) + func (v *Viewer) Staff() bool + func (v *Viewer) WithoutContentFilters() *Viewer