argocd

package
v1.8.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName is the name of the source plugin.
	PluginName = "argocd"
)

Variables

This section is empty.

Functions

This section is empty.

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 NewSource

func NewSource(version string) *Source

NewSource returns a new instance of Source.

func (*Source) HandleExternalRequest

func (s *Source) HandleExternalRequest(_ context.Context, input source.ExternalRequestInput) (source.ExternalRequestOutput, error)

HandleExternalRequest handles external requests from ArgoCD.

func (*Source) Metadata

func (s *Source) Metadata(_ context.Context) (api.MetadataOutput, error)

Metadata returns metadata of the ArgoCD configuration.

func (*Source) Stream

func (s *Source) Stream(ctx context.Context, input source.StreamInput) (source.StreamOutput, error)

Stream set-ups ArgoCD notifications.

type Template

type Template struct {
	Name string `yaml:"name"`
	Body string `yaml:"body"`
}

Template contains configuration related to template.

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.

type Webhook

type Webhook struct {
	Register bool   `yaml:"register"`
	Name     string `yaml:"name"`
	URL      string `yaml:"url"`
}

Webhook contains configuration related to webhook.

Jump to

Keyboard shortcuts

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