Documentation
¶
Index ¶
- func GenerateRPCErr(logger log.Logger, e error) error
- func GetHeaderString(ctx context.Context, headerKey string) string
- func SupportedHeaders(cfg HeadersConfig) map[string]bool
- type AlertService
- type Config
- type Deps
- type HeadersConfig
- type NamespaceService
- type NotificationService
- type ProviderService
- type ReceiverService
- type RuleService
- type SilenceService
- type SubscriptionReceiverService
- type SubscriptionService
- type TemplateService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SupportedHeaders ¶
func SupportedHeaders(cfg HeadersConfig) map[string]bool
Types ¶
type AlertService ¶
type Deps ¶
type Deps struct {
TemplateService TemplateService
RuleService RuleService
AlertService AlertService
ProviderService ProviderService
NamespaceService NamespaceService
ReceiverService ReceiverService
SubscriptionService SubscriptionService
SubscriptionReceiverService SubscriptionReceiverService
NotificationService NotificationService
SilenceService SilenceService
}
type HeadersConfig ¶
type NamespaceService ¶
type NotificationService ¶
type NotificationService interface {
Dispatch(context.Context, []notification.Notification) ([]string, error)
RemoveIdempotencies(ctx context.Context, TTL time.Duration) error
CheckIdempotency(ctx context.Context, scope, key string) (string, error)
InsertIdempotency(ctx context.Context, scope, key, notificationID string) error
ListNotificationMessages(ctx context.Context, notificationID string) ([]notification.Message, error)
List(ctx context.Context, flt notification.Filter) ([]notification.Notification, error)
}
type ProviderService ¶
type ReceiverService ¶
type ReceiverService interface {
List(ctx context.Context, flt receiver.Filter) ([]receiver.Receiver, error)
Create(ctx context.Context, rcv *receiver.Receiver) error
Get(ctx context.Context, id uint64, gopts ...receiver.GetOption) (*receiver.Receiver, error)
Update(ctx context.Context, rcv *receiver.Receiver) error
Delete(ctx context.Context, id uint64) error
}
type RuleService ¶
type SilenceService ¶
type SubscriptionReceiverService ¶ added in v0.7.6
type SubscriptionReceiverService interface {
List(ctx context.Context, flt subscriptionreceiver.Filter) ([]subscriptionreceiver.Relation, error)
BulkUpsert(ctx context.Context, rels []subscriptionreceiver.Relation) error
Update(ctx context.Context, rel *subscriptionreceiver.Relation) error
BulkSoftDelete(ctx context.Context, flt subscriptionreceiver.DeleteFilter) error
}
type SubscriptionService ¶
type SubscriptionService interface {
ListV2(context.Context, subscription.Filter) ([]subscription.Subscription, error)
CreateV2(context.Context, *subscription.Subscription) error
GetV2(context.Context, uint64) (*subscription.Subscription, error)
UpdateV2(context.Context, *subscription.Subscription) error
DeleteV2(context.Context, uint64) error
}
type TemplateService ¶
type TemplateService interface {
Upsert(context.Context, *template.Template) error
List(context.Context, template.Filter) ([]template.Template, error)
GetByName(context.Context, string) (*template.Template, error)
Delete(context.Context, string) error
Render(context.Context, string, map[string]string) (string, error)
}
Click to show internal directories.
Click to hide internal directories.