Documentation
¶
Overview ¶
Package store defines the composite Store interface for all Herald persistence.
The composite store follows the same pattern as Relay and Authsome: each subsystem defines its own store interface, and the aggregate Store composes them all.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProviderNotFound = storeerr.ErrProviderNotFound ErrTemplateNotFound = errors.New("herald: template not found") ErrVersionNotFound = errors.New("herald: template version not found") ErrMessageNotFound = errors.New("herald: message not found") ErrNotificationNotFound = errors.New("herald: in-app notification not found") ErrPreferenceNotFound = errors.New("herald: user preference not found") ErrScopedConfigNotFound = storeerr.ErrScopedConfigNotFound // ErrDuplicateSlug is returned when (app, slug, channel) already exists. ErrDuplicateSlug = errors.New("herald: duplicate template slug") // ErrDuplicateLocale is returned when (template, locale) already exists. ErrDuplicateLocale = errors.New("herald: duplicate locale version") )
Sentinel errors every Store implementation returns. The root herald package re-exports them, so callers can match either name with errors.Is.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface {
provider.Store
template.Store
message.Store
inbox.Store
preference.Store
scope.Store
// Migrate runs all schema migrations.
Migrate(ctx context.Context) error
// Ping checks database connectivity.
Ping(ctx context.Context) error
// Close closes the store connection.
Close() error
}
Store is the aggregate persistence interface for Herald.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package memory provides an in-memory Store implementation for testing.
|
Package memory provides an in-memory Store implementation for testing. |
|
Package mongo provides a MongoDB Store implementation using Grove ORM.
|
Package mongo provides a MongoDB Store implementation using Grove ORM. |
|
Package postgres provides a PostgreSQL Store implementation using Grove ORM.
|
Package postgres provides a PostgreSQL Store implementation using Grove ORM. |
|
Package sqlite provides a SQLite Store implementation using Grove ORM.
|
Package sqlite provides a SQLite Store implementation using Grove ORM. |
|
Package storetest is the conformance suite every herald store backend runs.
|
Package storetest is the conformance suite every herald store backend runs. |
Click to show internal directories.
Click to hide internal directories.