Help us shape the future of Go! Take the 2026 Go Developer Survey

argocd

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongContentType = errors.New("Content-Type header is not set to 'application/json'")
	ErrReadingBody      = errors.New("couldn't read request body")
	ErrMarshallingBody  = errors.New("couldn't unmarshal request body")
)

Functions

func ArgocdPlugin

func ArgocdPlugin(plugin Executor) func(w http.ResponseWriter, req *http.Request)

Types

type ActionSpec

type ActionSpec struct {
	App     *AppActionSpec `json:"app,omitempty"`
	Timeout string         `json:"timeout,omitempty"`
}

type ApiExecutor

type ApiExecutor struct {
	// contains filtered or unexported fields
}

func NewApiExecutor

func NewApiExecutor(apiClient apiclient.Client) ApiExecutor

func (ApiExecutor) Execute

type App

type App struct {
	// Namespace is the namespace in which the app is installed. If empty, assume the same namespace as the Argo CD
	// API server.
	Namespace string `json:"namespace,omitempty"`
	// Name is the name of the app (not prefixed with {namespace}/).
	Name string `json:"name,omitempty"`
}

App specifies the app to be synced.

type AppActionSpec

type AppActionSpec struct {
	// A sync action
	Sync *SyncAction `json:"sync,omitempty"`
}

AppActionSpec describes all possible actions that can be taken by the plugin.

type ArgocdPluginSpec

type ArgocdPluginSpec struct {
	Actions [][]ActionSpec `json:"actions,omitempty"`
}

ArgocdPluginSpec describes the parameters of the Argo CD plugin.

type Executor

type Executor interface {
	// Execute runs commands based on the args provided from the workflow
	Execute(args executor.ExecuteTemplateArgs) executor.ExecuteTemplateReply
}

Executor performs the tasks requested by the Workflow.

type PluginSpec

type PluginSpec struct {
	ArgoCD ArgocdPluginSpec `json:"argocd,omitempty"`
}

PluginSpec represents the `plugin` block of an Argo Workflows template.

type SyncAction

type SyncAction struct {
	// Apps are the applications to be synced.
	Apps []App `json:"apps,omitempty"`
	// Options is a list of option=value pairs to configure the sync operation. https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/
	Options []string `json:"options,omitempty"`
}

SyncAction describes an action that triggers an argocd sync.

Jump to

Keyboard shortcuts

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