Documentation
¶
Overview ¶
Package sqlite provides a SQLite Store implementation using Grove ORM.
Index ¶
- Variables
- type Store
- func (s *Store) Close() error
- func (s *Store) CountMessages(ctx context.Context, appID string, since time.Time) ([]message.Count, error)
- func (s *Store) CreateMessage(ctx context.Context, m *message.Message) error
- func (s *Store) CreateNotification(ctx context.Context, n *inbox.Notification) error
- func (s *Store) CreateProvider(ctx context.Context, p *provider.Provider) error
- func (s *Store) CreateTemplate(ctx context.Context, t *template.Template) error
- func (s *Store) CreateVersion(ctx context.Context, v *template.Version) error
- func (s *Store) DB() *grove.DB
- func (s *Store) DeleteNotification(ctx context.Context, notifID id.InboxID) error
- func (s *Store) DeletePreference(ctx context.Context, appID string, userID string) error
- func (s *Store) DeleteProvider(ctx context.Context, providerID id.ProviderID) error
- func (s *Store) DeleteScopedConfig(ctx context.Context, configID id.ScopedConfigID) error
- func (s *Store) DeleteTemplate(ctx context.Context, templateID id.TemplateID) error
- func (s *Store) DeleteVersion(ctx context.Context, versionID id.TemplateVersionID) error
- func (s *Store) GetMessage(ctx context.Context, messageID id.MessageID) (*message.Message, error)
- func (s *Store) GetNotification(ctx context.Context, notifID id.InboxID) (*inbox.Notification, error)
- func (s *Store) GetPreference(ctx context.Context, appID string, userID string) (*preference.Preference, error)
- func (s *Store) GetProvider(ctx context.Context, providerID id.ProviderID) (*provider.Provider, error)
- func (s *Store) GetScopedConfig(ctx context.Context, appID string, scopeType scope.ScopeType, scopeID string) (*scope.Config, error)
- func (s *Store) GetTemplate(ctx context.Context, templateID id.TemplateID) (*template.Template, error)
- func (s *Store) GetTemplateBySlug(ctx context.Context, appID string, slug string, channel string) (*template.Template, error)
- func (s *Store) GetVersion(ctx context.Context, versionID id.TemplateVersionID) (*template.Version, error)
- func (s *Store) ListAllProviders(ctx context.Context, appID string) ([]*provider.Provider, error)
- func (s *Store) ListMessages(ctx context.Context, appID string, opts message.ListOptions) ([]*message.Message, error)
- func (s *Store) ListNotifications(ctx context.Context, appID string, userID string, limit, offset int) ([]*inbox.Notification, error)
- func (s *Store) ListProviders(ctx context.Context, appID string, channel string) ([]*provider.Provider, error)
- func (s *Store) ListScopedConfigs(ctx context.Context, appID string) ([]*scope.Config, error)
- func (s *Store) ListTemplates(ctx context.Context, appID string) ([]*template.Template, error)
- func (s *Store) ListTemplatesByChannel(ctx context.Context, appID string, channel string) ([]*template.Template, error)
- func (s *Store) ListVersions(ctx context.Context, templateID id.TemplateID) ([]*template.Version, error)
- func (s *Store) MarkAllRead(ctx context.Context, appID string, userID string) error
- func (s *Store) MarkRead(ctx context.Context, notifID id.InboxID) error
- func (s *Store) Migrate(ctx context.Context) error
- func (s *Store) Ping(ctx context.Context) error
- func (s *Store) RecordDelivery(ctx context.Context, messageID id.MessageID, d message.Delivery) error
- func (s *Store) SetPreference(ctx context.Context, p *preference.Preference) error
- func (s *Store) SetScopedConfig(ctx context.Context, cfg *scope.Config) error
- func (s *Store) UnreadCount(ctx context.Context, appID string, userID string) (int, error)
- func (s *Store) UpdateProvider(ctx context.Context, p *provider.Provider) error
- func (s *Store) UpdateTemplate(ctx context.Context, t *template.Template) error
- func (s *Store) UpdateVersion(ctx context.Context, v *template.Version) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Migrations = migrate.NewGroup("herald")
Migrations is the grove migration group for the Herald store (SQLite).
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements store.Store using SQLite via Grove ORM.
func (*Store) CountMessages ¶
func (*Store) CreateMessage ¶
func (*Store) CreateNotification ¶
func (*Store) CreateProvider ¶
func (*Store) CreateTemplate ¶
func (*Store) CreateVersion ¶
func (*Store) DeleteNotification ¶
func (*Store) DeletePreference ¶
func (*Store) DeleteProvider ¶
func (*Store) DeleteScopedConfig ¶
func (*Store) DeleteTemplate ¶
func (*Store) DeleteVersion ¶
func (*Store) GetMessage ¶
func (*Store) GetNotification ¶
func (*Store) GetPreference ¶
func (s *Store) GetPreference(ctx context.Context, appID string, userID string) (*preference.Preference, error)
func (*Store) GetProvider ¶
func (*Store) GetScopedConfig ¶
func (*Store) GetTemplate ¶
func (*Store) GetTemplateBySlug ¶
func (*Store) GetVersion ¶
func (*Store) ListAllProviders ¶
func (*Store) ListMessages ¶
func (*Store) ListNotifications ¶
func (*Store) ListProviders ¶
func (*Store) ListScopedConfigs ¶
func (*Store) ListTemplates ¶
func (*Store) ListTemplatesByChannel ¶
func (*Store) ListVersions ¶
func (*Store) MarkAllRead ¶
func (*Store) Migrate ¶
Migrate creates the required tables and indexes using the grove orchestrator.
func (*Store) RecordDelivery ¶
func (*Store) SetPreference ¶
func (s *Store) SetPreference(ctx context.Context, p *preference.Preference) error
func (*Store) SetScopedConfig ¶
func (*Store) UnreadCount ¶
func (*Store) UpdateProvider ¶
func (*Store) UpdateTemplate ¶
Click to show internal directories.
Click to hide internal directories.