Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { pkg.Config // Context holds list of configured key value pairs available in notification templates Context map[string]string // Subscriptions holds list of default application subscriptions Subscriptions DefaultSubscriptions // DefaultTriggers holds list of triggers that is used by default if subscriber don't specify trigger DefaultTriggers []string // ArgoCDService encapsulates methods provided by Argo CD ArgoCDService argocd.Service // API allows sending notifications API pkg.API }
func NewConfig ¶ added in v1.0.0
func NewConfig(configMap *v1.ConfigMap, secret *v1.Secret, argocdService argocd.Service, opts ...CfgOpts) (*Config, error)
NewConfig retrieves configured templates and triggers from the provided config map
func (Config) GetGlobalSubscriptions ¶ added in v1.0.0
func (cfg Config) GetGlobalSubscriptions(labels map[string]string) pkg.Subscriptions
Returns list of recipients for the specified trigger
type DefaultSubscription ¶ added in v1.0.0
type DefaultSubscription struct { // Recipients comma separated list of recipients Recipients []string // Optional trigger name Triggers []string // Options label selector that limits applied applications Selector labels.Selector }
DefaultSubscription holds recipients that receives notification by default.
func (*DefaultSubscription) MarshalJSON ¶ added in v1.0.0
func (s *DefaultSubscription) MarshalJSON() ([]byte, error)
func (*DefaultSubscription) MatchesTrigger ¶ added in v1.0.0
func (s *DefaultSubscription) MatchesTrigger(trigger string) bool
func (*DefaultSubscription) UnmarshalJSON ¶ added in v1.0.0
func (s *DefaultSubscription) UnmarshalJSON(data []byte) error
type DefaultSubscriptions ¶ added in v0.6.1
type DefaultSubscriptions []DefaultSubscription
Click to show internal directories.
Click to hide internal directories.