domain

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownRecipient              = errors.New("subscription: unknown recipient")
	ErrSourceTypesMustHaveAtLeastOne = errors.New("subscription: notification types must have at least one")
	ErrSourceTypeNotFound            = errors.New("subscription: notification not found")
	ErrAlreadyEnabled                = errors.New("subscription: already enabled")
	ErrAlreadyDisabled               = errors.New("subscription: already disabled")
)

Functions

func ID

func ID(recipient *proto.Recipient) (string, error)

func SlackChannelRecipientID

func SlackChannelRecipientID(webhookURL string) string

Types

type Subscription

type Subscription struct {
	*proto.Subscription
}

func NewSubscription

func NewSubscription(
	name string,
	sourceTypes []proto.Subscription_SourceType,
	recipient *proto.Recipient) (*Subscription, error)

func (*Subscription) AddSourceTypes

func (s *Subscription) AddSourceTypes(sourceTypes []proto.Subscription_SourceType) error

func (*Subscription) DeleteSourceTypes

func (s *Subscription) DeleteSourceTypes(sourceTypes []proto.Subscription_SourceType) error

func (*Subscription) Disable

func (s *Subscription) Disable() error

func (*Subscription) Enable

func (s *Subscription) Enable() error

func (*Subscription) Rename

func (s *Subscription) Rename(name string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL