Documentation
¶
Overview ¶
Package memory provides an in-memory Store implementation for testing.
Index ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) CountMessages(_ context.Context, appID string, since time.Time) ([]message.Count, error)
- func (s *Store) CreateMessage(_ context.Context, m *message.Message) error
- func (s *Store) CreateNotification(_ context.Context, n *inbox.Notification) error
- func (s *Store) CreateProvider(_ context.Context, p *provider.Provider) error
- func (s *Store) CreateTemplate(_ context.Context, t *template.Template) error
- func (s *Store) CreateVersion(_ context.Context, v *template.Version) error
- func (s *Store) DeleteDevice(_ context.Context, appID, deviceID string) error
- func (s *Store) DeleteNotification(_ context.Context, notifID id.InboxID) error
- func (s *Store) DeletePreference(_ context.Context, appID, userID string) error
- func (s *Store) DeleteProvider(_ context.Context, providerID id.ProviderID) error
- func (s *Store) DeleteScopedConfig(_ context.Context, configID id.ScopedConfigID) error
- func (s *Store) DeleteTemplate(_ context.Context, templateID id.TemplateID) error
- func (s *Store) DeleteUserDevices(_ context.Context, appID, userID string) error
- func (s *Store) DeleteVersion(_ context.Context, versionID id.TemplateVersionID) error
- func (s *Store) GetDevice(_ context.Context, appID, deviceID string) (*device.Device, error)
- func (s *Store) GetMessage(_ context.Context, messageID id.MessageID) (*message.Message, error)
- func (s *Store) GetNotification(_ context.Context, notifID id.InboxID) (*inbox.Notification, error)
- func (s *Store) GetPreference(_ context.Context, appID, userID string) (*preference.Preference, error)
- func (s *Store) GetProvider(_ context.Context, providerID id.ProviderID) (*provider.Provider, error)
- func (s *Store) GetScopedConfig(_ context.Context, appID string, scopeType scope.ScopeType, scopeID string) (*scope.Config, error)
- func (s *Store) GetTemplate(_ context.Context, templateID id.TemplateID) (*template.Template, error)
- func (s *Store) GetTemplateBySlug(_ context.Context, appID, slug, channel string) (*template.Template, error)
- func (s *Store) GetVersion(_ context.Context, versionID id.TemplateVersionID) (*template.Version, error)
- func (s *Store) ListAllProviders(_ context.Context, appID string) ([]*provider.Provider, error)
- func (s *Store) ListDevices(_ context.Context, appID, userID string) ([]*device.Device, error)
- func (s *Store) ListMessages(_ context.Context, appID string, opts message.ListOptions) ([]*message.Message, error)
- func (s *Store) ListNotifications(_ context.Context, appID, userID string, limit, offset int) ([]*inbox.Notification, error)
- func (s *Store) ListProviders(_ context.Context, appID string, channel string) ([]*provider.Provider, error)
- func (s *Store) ListScopedConfigs(_ context.Context, appID string) ([]*scope.Config, error)
- func (s *Store) ListTemplates(_ context.Context, appID string) ([]*template.Template, error)
- func (s *Store) ListTemplatesByChannel(_ context.Context, appID, channel string) ([]*template.Template, error)
- func (s *Store) ListVersions(_ context.Context, templateID id.TemplateID) ([]*template.Version, error)
- func (s *Store) MarkAllRead(_ context.Context, appID, userID string) error
- func (s *Store) MarkRead(_ context.Context, notifID id.InboxID) error
- func (s *Store) Migrate(_ context.Context) error
- func (s *Store) Ping(_ context.Context) error
- func (s *Store) RecordDelivery(_ context.Context, messageID id.MessageID, d message.Delivery) error
- func (s *Store) SaveDevice(_ context.Context, d *device.Device) error
- func (s *Store) SetPreference(_ context.Context, p *preference.Preference) error
- func (s *Store) SetScopedConfig(_ context.Context, cfg *scope.Config) error
- func (s *Store) UnreadCount(_ context.Context, appID, userID string) (int, error)
- func (s *Store) UpdateProvider(_ context.Context, p *provider.Provider) error
- func (s *Store) UpdateTemplate(_ context.Context, t *template.Template) error
- func (s *Store) UpdateVersion(_ context.Context, v *template.Version) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an in-memory implementation of herald's composite store.
func (*Store) CountMessages ¶
func (*Store) CreateMessage ¶
func (*Store) CreateNotification ¶
func (*Store) CreateProvider ¶
func (*Store) CreateTemplate ¶
func (*Store) CreateVersion ¶
func (*Store) DeleteDevice ¶
func (*Store) DeleteNotification ¶
func (*Store) DeletePreference ¶
func (*Store) DeleteProvider ¶
func (*Store) DeleteScopedConfig ¶
func (*Store) DeleteTemplate ¶
func (*Store) DeleteUserDevices ¶
func (*Store) DeleteVersion ¶
func (*Store) GetMessage ¶
func (*Store) GetNotification ¶
func (*Store) GetPreference ¶
func (s *Store) GetPreference(_ context.Context, appID, 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) ListDevices ¶
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) RecordDelivery ¶
func (*Store) SetPreference ¶
func (s *Store) SetPreference(_ 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.