Documentation ¶
Index ¶
- func Migrate(cfg db.Config) error
- type AlertRepository
- func (r AlertRepository) BulkUpdateSilence(ctx context.Context, alertIDs []int64, silenceStatus string) error
- func (r AlertRepository) Create(ctx context.Context, alrt alert.Alert) (alert.Alert, error)deprecated
- func (r AlertRepository) List(ctx context.Context, flt alert.Filter) ([]alert.Alert, error)
- type IdempotencyRepository
- func (r *IdempotencyRepository) Check(ctx context.Context, scope, key string) (*notification.Idempotency, error)
- func (r *IdempotencyRepository) Create(ctx context.Context, scope, key, notificationID string) (*notification.Idempotency, error)
- func (r *IdempotencyRepository) Delete(ctx context.Context, filter notification.IdempotencyFilter) error
- type LogRepository
- func (r *LogRepository) BulkCreate(ctx context.Context, nss []log.Notification) error
- func (r *LogRepository) ListAlertIDsBySilenceID(ctx context.Context, silenceID string) ([]int64, error)
- func (r *LogRepository) ListSubscriptionIDsBySilenceID(ctx context.Context, silenceID string) ([]int64, error)
- type NamespaceRepository
- func (r *NamespaceRepository) Commit(ctx context.Context) error
- func (r NamespaceRepository) Create(ctx context.Context, ns *namespace.EncryptedNamespace) error
- func (r NamespaceRepository) Delete(ctx context.Context, id uint64) error
- func (r NamespaceRepository) Get(ctx context.Context, id uint64) (*namespace.EncryptedNamespace, error)
- func (r NamespaceRepository) List(ctx context.Context) ([]namespace.EncryptedNamespace, error)
- func (r *NamespaceRepository) Rollback(ctx context.Context, err error) error
- func (r NamespaceRepository) Update(ctx context.Context, ns *namespace.EncryptedNamespace) error
- func (r NamespaceRepository) UpdateLabels(ctx context.Context, id uint64, labels map[string]string) error
- func (r *NamespaceRepository) WithTransaction(ctx context.Context) context.Context
- type NotificationRepository
- func (r *NotificationRepository) BulkCreate(ctx context.Context, ns []notification.Notification) ([]notification.Notification, error)
- func (r *NotificationRepository) Commit(ctx context.Context) error
- func (r *NotificationRepository) Create(ctx context.Context, n notification.Notification) (notification.Notification, error)
- func (r *NotificationRepository) List(ctx context.Context, flt notification.Filter) ([]notification.Notification, error)
- func (r *NotificationRepository) Rollback(ctx context.Context, err error) error
- func (r *NotificationRepository) WithTransaction(ctx context.Context) context.Context
- type ProviderRepository
- func (r ProviderRepository) Create(ctx context.Context, prov *provider.Provider) error
- func (r ProviderRepository) Delete(ctx context.Context, id uint64) error
- func (r ProviderRepository) Get(ctx context.Context, id uint64) (*provider.Provider, error)
- func (r ProviderRepository) List(ctx context.Context, flt provider.Filter) ([]provider.Provider, error)
- func (r ProviderRepository) Update(ctx context.Context, provDomain *provider.Provider) error
- type ReceiverRepository
- func (r ReceiverRepository) Create(ctx context.Context, rcv *receiver.Receiver) error
- func (r ReceiverRepository) Delete(ctx context.Context, id uint64) error
- func (r ReceiverRepository) Get(ctx context.Context, id uint64, flt receiver.Filter) (*receiver.Receiver, error)
- func (r ReceiverRepository) List(ctx context.Context, flt receiver.Filter) ([]receiver.Receiver, error)
- func (r ReceiverRepository) PatchLabels(ctx context.Context, rcv *receiver.Receiver) error
- func (r ReceiverRepository) Update(ctx context.Context, rcv *receiver.Receiver) error
- type RuleRepository
- func (r *RuleRepository) Commit(ctx context.Context) error
- func (r *RuleRepository) List(ctx context.Context, flt rule.Filter) ([]rule.Rule, error)
- func (r *RuleRepository) Rollback(ctx context.Context, err error) error
- func (r *RuleRepository) Upsert(ctx context.Context, rl *rule.Rule) error
- func (r *RuleRepository) WithTransaction(ctx context.Context) context.Context
- type SilenceRepository
- func (r *SilenceRepository) Create(ctx context.Context, s silence.Silence) (string, error)
- func (r *SilenceRepository) Get(ctx context.Context, id string) (silence.Silence, error)
- func (r *SilenceRepository) List(ctx context.Context, flt silence.Filter) ([]silence.Silence, error)
- func (r *SilenceRepository) SoftDelete(ctx context.Context, id string) error
- type SubscriptionReceiverRepository
- func (s *SubscriptionReceiverRepository) BulkCreate(ctx context.Context, subscriptionsReceivers []subscriptionreceiver.Relation) error
- func (r *SubscriptionReceiverRepository) BulkDelete(ctx context.Context, flt subscriptionreceiver.DeleteFilter) error
- func (r *SubscriptionReceiverRepository) BulkSoftDelete(ctx context.Context, flt subscriptionreceiver.DeleteFilter) error
- func (r *SubscriptionReceiverRepository) BulkUpsert(ctx context.Context, subscriptionsReceivers []subscriptionreceiver.Relation) error
- func (s *SubscriptionReceiverRepository) List(ctx context.Context, flt subscriptionreceiver.Filter) ([]subscriptionreceiver.Relation, error)
- func (r *SubscriptionReceiverRepository) Update(ctx context.Context, rel *subscriptionreceiver.Relation) error
- type SubscriptionRepository
- func (r *SubscriptionRepository) Commit(ctx context.Context) error
- func (r *SubscriptionRepository) Create(ctx context.Context, sub *subscription.Subscription) error
- func (r *SubscriptionRepository) Delete(ctx context.Context, id uint64) error
- func (r *SubscriptionRepository) Get(ctx context.Context, id uint64) (*subscription.Subscription, error)
- func (r *SubscriptionRepository) List(ctx context.Context, flt subscription.Filter) ([]subscription.Subscription, error)
- func (r *SubscriptionRepository) MatchLabelsFetchReceivers(ctx context.Context, flt subscription.Filter) ([]subscription.ReceiverView, error)
- func (r *SubscriptionRepository) Rollback(ctx context.Context, err error) error
- func (r *SubscriptionRepository) Update(ctx context.Context, sub *subscription.Subscription) error
- func (r *SubscriptionRepository) WithTransaction(ctx context.Context) context.Context
- type TemplateRepository
- func (r TemplateRepository) Delete(ctx context.Context, name string) error
- func (r TemplateRepository) GetByName(ctx context.Context, name string) (*template.Template, error)
- func (r TemplateRepository) List(ctx context.Context, flt template.Filter) ([]template.Template, error)
- func (r TemplateRepository) Upsert(ctx context.Context, tmpl *template.Template) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlertRepository ¶
type AlertRepository struct {
// contains filtered or unexported fields
}
AlertRepository talks to the store to read or insert data
func NewAlertRepository ¶
func NewAlertRepository(client *pgc.Client) *AlertRepository
NewAlertRepository returns repository struct
func (AlertRepository) BulkUpdateSilence ¶
type IdempotencyRepository ¶
type IdempotencyRepository struct {
// contains filtered or unexported fields
}
IdempotencyRepository talks to the store to read or insert idempotency keys
func NewIdempotencyRepository ¶
func NewIdempotencyRepository(client *pgc.Client) *IdempotencyRepository
NewIdempotencyRepository returns repository struct
func (*IdempotencyRepository) Check ¶ added in v0.7.0
func (r *IdempotencyRepository) Check(ctx context.Context, scope, key string) (*notification.Idempotency, error)
func (*IdempotencyRepository) Create ¶ added in v0.7.0
func (r *IdempotencyRepository) Create(ctx context.Context, scope, key, notificationID string) (*notification.Idempotency, error)
func (*IdempotencyRepository) Delete ¶
func (r *IdempotencyRepository) Delete(ctx context.Context, filter notification.IdempotencyFilter) error
type LogRepository ¶
type LogRepository struct {
// contains filtered or unexported fields
}
LogRepository talks to the store to read or insert data
func NewLogRepository ¶
func NewLogRepository(client *pgc.Client) *LogRepository
NewLogRepository returns LogRepository struct
func (*LogRepository) BulkCreate ¶
func (r *LogRepository) BulkCreate(ctx context.Context, nss []log.Notification) error
func (*LogRepository) ListAlertIDsBySilenceID ¶
func (*LogRepository) ListSubscriptionIDsBySilenceID ¶
type NamespaceRepository ¶
type NamespaceRepository struct {
// contains filtered or unexported fields
}
NamespaceRepository talks to the store to read or insert data
func NewNamespaceRepository ¶
func NewNamespaceRepository(client *pgc.Client) *NamespaceRepository
NewNamespaceRepository returns repository struct
func (*NamespaceRepository) Commit ¶
func (r *NamespaceRepository) Commit(ctx context.Context) error
func (NamespaceRepository) Create ¶
func (r NamespaceRepository) Create(ctx context.Context, ns *namespace.EncryptedNamespace) error
func (NamespaceRepository) Delete ¶
func (r NamespaceRepository) Delete(ctx context.Context, id uint64) error
func (NamespaceRepository) Get ¶
func (r NamespaceRepository) Get(ctx context.Context, id uint64) (*namespace.EncryptedNamespace, error)
func (NamespaceRepository) List ¶
func (r NamespaceRepository) List(ctx context.Context) ([]namespace.EncryptedNamespace, error)
func (*NamespaceRepository) Rollback ¶
func (r *NamespaceRepository) Rollback(ctx context.Context, err error) error
func (NamespaceRepository) Update ¶
func (r NamespaceRepository) Update(ctx context.Context, ns *namespace.EncryptedNamespace) error
func (NamespaceRepository) UpdateLabels ¶ added in v0.6.9
func (*NamespaceRepository) WithTransaction ¶
func (r *NamespaceRepository) WithTransaction(ctx context.Context) context.Context
type NotificationRepository ¶
type NotificationRepository struct {
// contains filtered or unexported fields
}
NotificationRepository talks to the store to read or insert data
func NewNotificationRepository ¶
func NewNotificationRepository(client *pgc.Client) *NotificationRepository
NewNotificationRepository returns NotificationRepository struct
func (*NotificationRepository) BulkCreate ¶ added in v0.7.6
func (r *NotificationRepository) BulkCreate(ctx context.Context, ns []notification.Notification) ([]notification.Notification, error)
func (*NotificationRepository) Commit ¶ added in v0.7.0
func (r *NotificationRepository) Commit(ctx context.Context) error
func (*NotificationRepository) Create ¶
func (r *NotificationRepository) Create(ctx context.Context, n notification.Notification) (notification.Notification, error)
func (*NotificationRepository) List ¶ added in v0.7.4
func (r *NotificationRepository) List(ctx context.Context, flt notification.Filter) ([]notification.Notification, error)
func (*NotificationRepository) Rollback ¶ added in v0.7.0
func (r *NotificationRepository) Rollback(ctx context.Context, err error) error
func (*NotificationRepository) WithTransaction ¶ added in v0.7.0
func (r *NotificationRepository) WithTransaction(ctx context.Context) context.Context
type ProviderRepository ¶
type ProviderRepository struct {
// contains filtered or unexported fields
}
ProviderRepository talks to the store to read or insert data
func NewProviderRepository ¶
func NewProviderRepository(client *pgc.Client) *ProviderRepository
NewProviderRepository returns repository struct
func (ProviderRepository) Delete ¶
func (r ProviderRepository) Delete(ctx context.Context, id uint64) error
type ReceiverRepository ¶
type ReceiverRepository struct {
// contains filtered or unexported fields
}
ReceiverRepository talks to the store to read or insert data
func NewReceiverRepository ¶
func NewReceiverRepository(client *pgc.Client) *ReceiverRepository
NewReceiverRepository returns repository struct
func (ReceiverRepository) Delete ¶
func (r ReceiverRepository) Delete(ctx context.Context, id uint64) error
func (ReceiverRepository) PatchLabels ¶ added in v0.7.0
type RuleRepository ¶
type RuleRepository struct {
// contains filtered or unexported fields
}
RuleRepository talks to the store to read or insert data
func NewRuleRepository ¶
func NewRuleRepository(client *pgc.Client) *RuleRepository
NewRuleRepository returns repository struct
func (*RuleRepository) Rollback ¶
func (r *RuleRepository) Rollback(ctx context.Context, err error) error
func (*RuleRepository) WithTransaction ¶
func (r *RuleRepository) WithTransaction(ctx context.Context) context.Context
type SilenceRepository ¶
type SilenceRepository struct {
// contains filtered or unexported fields
}
SilenceRepository talks to the store to read or insert data
func NewSilenceRepository ¶
func NewSilenceRepository(client *pgc.Client) *SilenceRepository
NewSilenceRepository returns repository struct
func (*SilenceRepository) SoftDelete ¶
func (r *SilenceRepository) SoftDelete(ctx context.Context, id string) error
type SubscriptionReceiverRepository ¶ added in v0.7.5
type SubscriptionReceiverRepository struct {
// contains filtered or unexported fields
}
SubscriptionReceiverRepository talks to the store to read or insert data
func NewSubscriptionReceiverRepository ¶ added in v0.7.5
func NewSubscriptionReceiverRepository(client *pgc.Client) *SubscriptionReceiverRepository
NewSSubscriptionReceiverRepository returns SubscriptionReceiverRepository struct
func (*SubscriptionReceiverRepository) BulkCreate ¶ added in v0.7.5
func (s *SubscriptionReceiverRepository) BulkCreate(ctx context.Context, subscriptionsReceivers []subscriptionreceiver.Relation) error
func (*SubscriptionReceiverRepository) BulkDelete ¶ added in v0.7.5
func (r *SubscriptionReceiverRepository) BulkDelete(ctx context.Context, flt subscriptionreceiver.DeleteFilter) error
func (*SubscriptionReceiverRepository) BulkSoftDelete ¶ added in v0.7.5
func (r *SubscriptionReceiverRepository) BulkSoftDelete(ctx context.Context, flt subscriptionreceiver.DeleteFilter) error
func (*SubscriptionReceiverRepository) BulkUpsert ¶ added in v0.7.5
func (r *SubscriptionReceiverRepository) BulkUpsert(ctx context.Context, subscriptionsReceivers []subscriptionreceiver.Relation) error
func (*SubscriptionReceiverRepository) List ¶ added in v0.7.5
func (s *SubscriptionReceiverRepository) List(ctx context.Context, flt subscriptionreceiver.Filter) ([]subscriptionreceiver.Relation, error)
func (*SubscriptionReceiverRepository) Update ¶ added in v0.7.6
func (r *SubscriptionReceiverRepository) Update(ctx context.Context, rel *subscriptionreceiver.Relation) error
type SubscriptionRepository ¶
type SubscriptionRepository struct {
// contains filtered or unexported fields
}
SubscriptionRepository talks to the store to read or insert data
func NewSubscriptionRepository ¶
func NewSubscriptionRepository(client *pgc.Client) *SubscriptionRepository
NewSubscriptionRepository returns SubscriptionRepository struct
func (*SubscriptionRepository) Commit ¶ added in v0.7.5
func (r *SubscriptionRepository) Commit(ctx context.Context) error
func (*SubscriptionRepository) Create ¶
func (r *SubscriptionRepository) Create(ctx context.Context, sub *subscription.Subscription) error
func (*SubscriptionRepository) Delete ¶
func (r *SubscriptionRepository) Delete(ctx context.Context, id uint64) error
func (*SubscriptionRepository) Get ¶
func (r *SubscriptionRepository) Get(ctx context.Context, id uint64) (*subscription.Subscription, error)
func (*SubscriptionRepository) List ¶
func (r *SubscriptionRepository) List(ctx context.Context, flt subscription.Filter) ([]subscription.Subscription, error)
func (*SubscriptionRepository) MatchLabelsFetchReceivers ¶ added in v0.7.5
func (r *SubscriptionRepository) MatchLabelsFetchReceivers(ctx context.Context, flt subscription.Filter) ([]subscription.ReceiverView, error)
func (*SubscriptionRepository) Rollback ¶ added in v0.7.5
func (r *SubscriptionRepository) Rollback(ctx context.Context, err error) error
func (*SubscriptionRepository) Update ¶
func (r *SubscriptionRepository) Update(ctx context.Context, sub *subscription.Subscription) error
func (*SubscriptionRepository) WithTransaction ¶ added in v0.7.5
func (r *SubscriptionRepository) WithTransaction(ctx context.Context) context.Context
type TemplateRepository ¶
type TemplateRepository struct {
// contains filtered or unexported fields
}
TemplateRepository talks to the store to read or insert data
func NewTemplateRepository ¶
func NewTemplateRepository(client *pgc.Client) *TemplateRepository
NewTemplateRepository returns repository struct
func (TemplateRepository) Delete ¶
func (r TemplateRepository) Delete(ctx context.Context, name string) error