Versions in this module Expand all Collapse all v0 v0.5.9 Feb 22, 2023 v0.5.8 Feb 6, 2023 Changes in this version + const TargetExpressionRuleKey + const TypeMatchers + const TypeSubscription + func IsTypeValid(silenceTypeStr string) bool + type Filter struct + ID string + Match map[string]string + NamespaceID uint64 + SubscriptionID uint64 + SubscriptionMatch map[string]string + type Repository interface + Create func(context.Context, Silence) (string, error) + Get func(ctx context.Context, id string) (Silence, error) + List func(context.Context, Filter) ([]Silence, error) + SoftDelete func(ctx context.Context, id string) error + type Service struct + func NewService(repo Repository) *Service + func (s *Service) Create(ctx context.Context, sil Silence) (string, error) + func (s *Service) Delete(ctx context.Context, id string) error + func (s *Service) Get(ctx context.Context, id string) (Silence, error) + func (s *Service) List(ctx context.Context, filter Filter) ([]Silence, error) + type Silence struct + Comment string + CreatedAt time.Time + Creator string + DeletedAt time.Time + ID string + NamespaceID uint64 + TargetExpression map[string]interface{} + TargetID uint64 + Type string + func (s Silence) EvaluateSubscriptionRule(env interface{}) (bool, error) + func (s Silence) Validate() error