Documentation
¶
Index ¶
- Variables
- type RuleRepository
- type RuleService
- func (s *RuleService) Create(ctx context.Context, rule models.Rule) (models.Rule, error)
- func (s *RuleService) Delete(ctx context.Context, id string) error
- func (s *RuleService) Get(ctx context.Context, id string) (models.Rule, error)
- func (s *RuleService) List(ctx context.Context) ([]models.Rule, error)
- func (s *RuleService) Update(ctx context.Context, id string, rule models.Rule) (models.Rule, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrChannelNotFound = fmt.Errorf("notification channel not found")
View Source
var ErrRecipientNotSupported = fmt.Errorf("recipient is not supported for the selected channel")
View Source
var ErrRecipientRequired = fmt.Errorf("recipient is required for the selected channel")
View Source
var ErrRuleLimitReached = fmt.Errorf("alert rule limit reached")
Functions ¶
This section is empty.
Types ¶
type RuleRepository ¶
type RuleRepository interface {
Get(ctx context.Context, id string) (models.Rule, error)
List(ctx context.Context) ([]models.Rule, error)
Create(ctx context.Context, rule models.Rule) (models.Rule, error)
Update(ctx context.Context, id string, rule models.Rule) (models.Rule, error)
Delete(ctx context.Context, id string) error
}
type RuleService ¶
type RuleService struct {
// contains filtered or unexported fields
}
func NewRuleService ¶
func NewRuleService(store RuleRepository, channelStore notificationrepository.NotificationChannelRepository, ruleLimit int) *RuleService
Click to show internal directories.
Click to hide internal directories.