Documentation ¶
Index ¶
- Variables
- func ID(recipient *proto.Recipient) (string, error)
- func SlackChannelRecipientID(webhookURL string) string
- type Subscription
- func (s *Subscription) AddSourceTypes(sourceTypes []proto.Subscription_SourceType) error
- func (s *Subscription) DeleteSourceTypes(sourceTypes []proto.Subscription_SourceType) error
- func (s *Subscription) Disable() error
- func (s *Subscription) Enable() error
- func (s *Subscription) Rename(name string) error
- func (s *Subscription) UpdateSubscription(name *wrapperspb.StringValue, sourceTypes []proto.Subscription_SourceType, ...) (*Subscription, error)
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 SlackChannelRecipientID ¶
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
func (*Subscription) UpdateSubscription ¶ added in v1.2.0
func (s *Subscription) UpdateSubscription( name *wrapperspb.StringValue, sourceTypes []proto.Subscription_SourceType, disabled *wrapperspb.BoolValue, ) (*Subscription, error)
Click to show internal directories.
Click to hide internal directories.