argocd

package
v0.0.0-...-99593a5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LockKey = "corymurphy.io/argobot/lockedby"

Functions

func LiveObjects

func LiveObjects(resources []*argoappv1.ResourceDiff) ([]*unstructured.Unstructured, error)

func UnmarshalToUnstructured

func UnmarshalToUnstructured(resource string) (*unstructured.Unstructured, error)

Types

type ApplicationManifestQuery

type ApplicationManifestQuery struct {
	Name                 *string  `protobuf:"bytes,1,req,name=name" json:"name,omitempty"`
	Revision             *string  `protobuf:"bytes,2,opt,name=revision" json:"revision,omitempty"`
	AppNamespace         *string  `protobuf:"bytes,3,opt,name=appNamespace" json:"appNamespace,omitempty"`
	Project              *string  `protobuf:"bytes,4,opt,name=project" json:"project,omitempty"`
	SourcePositions      []int64  `protobuf:"varint,5,rep,name=sourcePositions" json:"sourcePositions,omitempty"`
	Revisions            []string `protobuf:"bytes,6,rep,name=revisions" json:"revisions,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

type ApplicationSyncRequest

type ApplicationSyncRequest struct {
	Name     string `json:"name"`
	Revision string `json:"revision"`
	DryRun   bool   `json:"dryRun"`
}

type ApplicationsClient

type ApplicationsClient struct {
	BaseUrl string
	Token   string
}

func (*ApplicationsClient) Apply

func (c *ApplicationsClient) Apply(app string, revision string) (string, error)

func (*ApplicationsClient) Get

func (*ApplicationsClient) GetManifest

func (c *ApplicationsClient) GetManifest(name string, revision string) (*apiclient.ManifestResponse, error)

func (*ApplicationsClient) GetSettings

func (c *ApplicationsClient) GetSettings() (settings.Settings, error)

func (*ApplicationsClient) List

func (*ApplicationsClient) ManagedResources

func (*ApplicationsClient) PutApplicationSpec

func (c *ApplicationsClient) PutApplicationSpec(name string, spec *argoappv1.ApplicationSpec) error

type ApplyClient

type ApplyClient interface {
	Apply(app string, revision string) (string, error)
}

type Client

type Client interface {
	Plan(app string, sha string) (string, error)
	Apply(app string, revision string) (string, error)
}

type Locker

type Locker struct {
	ArgoClient *ApplicationsClient
	Log        logging.SimpleLogging
}

func NewLocker

func NewLocker(client *ApplicationsClient, log logging.SimpleLogging) *Locker

func (*Locker) IsLocked

func (l *Locker) IsLocked(ctx context.Context, name string) (bool, string, error)

func (*Locker) Lock

func (l *Locker) Lock(ctx context.Context, name string, by string) error

func (*Locker) Unlock

func (l *Locker) Unlock(ctx context.Context, name string) error

type MockClient

type MockClient struct {
	PlanResponse string
	Error        error
}

func (*MockClient) Plan

func (c *MockClient) Plan(app string, sha string) (string, error)

type PlanClient

type PlanClient interface {
	Plan(app string, sha string) (string, error)
}

type Planner

type Planner struct {
	ArgoClient *ApplicationsClient
	Log        logging.SimpleLogging
}

func NewPlanner

func NewPlanner(client *ApplicationsClient, log logging.SimpleLogging) *Planner

func (*Planner) Plan

func (p *Planner) Plan(ctx context.Context, name string, revision string) (string, bool, error)

type ResourceKey

type ResourceKey struct {
	Group     string
	Kind      string
	Namespace string
	Name      string
}

Jump to

Keyboard shortcuts

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