Documentation
¶
Index ¶
- Constants
- func NewSource(version string) source.Source
- type ArgoCD
- type Config
- type DefaultNotificationSubscriptions
- type IncomingRequestBody
- type IncomingRequestContext
- type Interactivity
- type NewTrigger
- type Notification
- type NotificationSubscriptions
- type NotificationTrigger
- type RefByName
- type Source
- func (s *Source) HandleExternalRequest(_ context.Context, input source.ExternalRequestInput) (source.ExternalRequestOutput, error)
- func (s *Source) Metadata(_ context.Context) (api.MetadataOutput, error)
- func (s *Source) Stream(ctx context.Context, input source.StreamInput) (source.StreamOutput, error)
- type Template
- type TriggerCondition
- type TriggerFromExisting
- type Webhook
Constants ¶
const (
// PluginName is the name of the source plugin.
PluginName = "argocd"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArgoCD ¶
type ArgoCD struct {
UIBaseURL string `yaml:"uiBaseUrl"`
NotificationsConfigMap config.K8sResourceRef `yaml:"notificationsConfigMap"`
}
ArgoCD contains configuration related to ArgoCD installation.
type Config ¶
type Config struct {
Log config.Logger `yaml:"log"`
ArgoCD ArgoCD `yaml:"argoCD"`
DefaultSubscriptions DefaultNotificationSubscriptions `yaml:"defaultSubscriptions"`
Webhook Webhook `yaml:"webhook"`
// Fields not exposed to the user in the JSON schema
Notifications []Notification `yaml:"notifications"`
Templates []Template `yaml:"templates"`
Interactivity Interactivity `yaml:"interactivity"`
}
Config contains configuration for ArgoCD source plugin.
type DefaultNotificationSubscriptions ¶
type DefaultNotificationSubscriptions struct {
Applications []config.K8sResourceRef `yaml:"applications"`
}
DefaultNotificationSubscriptions contains configuration related to default notification subscriptions.
type IncomingRequestBody ¶
type IncomingRequestBody struct {
Message api.Message `json:"message"`
Context IncomingRequestContext `json:"context"`
}
type IncomingRequestContext ¶
type IncomingRequestContext struct {
App *config.K8sResourceRef `json:"app"`
DetailsUIPath *string `json:"detailsUiPath"`
RepoURL *string `json:"repoUrl"`
}
type Interactivity ¶
type Interactivity struct {
EnableViewInUIButton bool `yaml:"enableViewInUIButton"`
EnableOpenRepositoryButton bool `yaml:"enableOpenRepositoryButton"`
CommandVerbs []string `yaml:"commandVerbs"`
}
Interactivity contains configuration related to interactivity.
type NewTrigger ¶
type NewTrigger struct {
Name string `yaml:"name"`
Conditions []TriggerCondition `yaml:"conditions"`
}
NewTrigger contains configuration related to new trigger.
type Notification ¶
type Notification struct {
Trigger NotificationTrigger `yaml:"trigger"`
Subscriptions NotificationSubscriptions `yaml:"subscriptions"`
}
Notification contains configuration related to notification.
type NotificationSubscriptions ¶
type NotificationSubscriptions struct {
Create bool `yaml:"create"`
Applications []config.K8sResourceRef `yaml:"applications"`
}
NotificationSubscriptions contains configuration related to notification subscriptions.
type NotificationTrigger ¶
type NotificationTrigger struct {
FromExisting *TriggerFromExisting `yaml:"fromExisting"`
Create *NewTrigger `yaml:"create"`
}
NotificationTrigger contains configuration related to notification trigger.
type RefByName ¶
type RefByName struct {
Name string `yaml:"name"`
}
RefByName contains configuration related to reference by name.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source defines ArgoCD source plugin.
func (*Source) HandleExternalRequest ¶
func (s *Source) HandleExternalRequest(_ context.Context, input source.ExternalRequestInput) (source.ExternalRequestOutput, error)
HandleExternalRequest handles external requests from ArgoCD.
func (*Source) Stream ¶
func (s *Source) Stream(ctx context.Context, input source.StreamInput) (source.StreamOutput, error)
Stream set-ups ArgoCD notifications.
type TriggerCondition ¶
type TriggerCondition struct {
OncePer string `yaml:"oncePer,omitempty"`
When string `yaml:"when,omitempty"`
Description string `yaml:"description,omitempty"`
Send []string `yaml:"send,omitempty"`
}
TriggerCondition holds expression and template that must be used to create notification is expression is returns true Copied from `github.com/argoproj/notifications-engine@v0.4.0/pkg/triggers/service.go` and replaced json tags with yaml.
type TriggerFromExisting ¶
type TriggerFromExisting struct {
Name string `yaml:"name"`
TemplateName string `yaml:"templateName"`
}
TriggerFromExisting contains configuration related to trigger from existing.