Documentation
¶
Overview ¶
Package provider defines the notification provider entity and its store interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
ID id.ProviderID `json:"id"`
AppID string `json:"app_id"`
Name string `json:"name"`
Channel string `json:"channel"`
Driver string `json:"driver"`
Credentials map[string]string `json:"credentials,omitempty"`
Settings map[string]string `json:"settings,omitempty"`
Priority int `json:"priority"`
Enabled bool `json:"enabled"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Provider represents a configured notification delivery provider. Each provider is scoped to an app and handles a single channel type.
type Store ¶
type Store interface {
CreateProvider(ctx context.Context, p *Provider) error
GetProvider(ctx context.Context, providerID id.ProviderID) (*Provider, error)
UpdateProvider(ctx context.Context, p *Provider) error
DeleteProvider(ctx context.Context, providerID id.ProviderID) error
ListProviders(ctx context.Context, appID string, channel string) ([]*Provider, error)
ListAllProviders(ctx context.Context, appID string) ([]*Provider, error)
}
Store defines persistence operations for providers.
Click to show internal directories.
Click to hide internal directories.