models

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	ActionSync        Action = "sync"
	ActionRefresh     Action = "refresh"
	ActionHardRefresh Action = "hard-refresh"
)

type AppKey

type AppKey struct {
	Name string
}

AppKey is cross-cluster identifier used for grouping.

type AppRef

type AppRef struct {
	Name      string
	Namespace string
}

AppRef identifies one application inside a single Argo CD instance.

type Application

type Application struct {
	Key       AppKey
	Project   string
	Namespace string

	// application.status.sync.status ("Synced", "OutOfSync").
	SyncStatus string

	// application.status.health.status ("Healthy", "Degraded", "Progressing").
	HealthStatus string

	// application.status.operationState.phase ("Running", "Succeeded", "Failed").
	OperationPhase string

	// application.status.operationState.message.
	OperationMessage string

	// application.status.resources (kind, namespace, name, group).
	Resources []SyncResource

	// application.status.resources
	ResourceStatuses []ResourceStatus
}

type Cluster

type Cluster struct {
	ContextName     string
	Server          string
	Insecure        bool
	AuthToken       string
	GRPCWeb         bool
	GRPCWebRootPath string

	ServerVersion string
	ServerMajor   int
}

contexts:

  • name: server: user:

current-context: prompts-enabled: false servers:

  • grpc-web-root-path: / server:

users:

  • auth-token: name:

type Inventory

type Inventory map[AppKey]map[string]Application

Inventory contains all discovered apps grouped by AppKey.

type ProgressEvent

type ProgressEvent struct {
	At     time.Time
	Target Target

	Phase  TaskStatus
	Action Action

	Message string
	Err     error
}

ProgressEvent streams execution progress to the UI.

type ResourceStatus added in v0.0.4

type ResourceStatus struct {
	Resource     SyncResource
	SyncStatus   string
	HealthStatus string
}

type Result

type Result struct {
	Target Target
	Action Action
	Status TaskStatus
	Err    error
}

type RunOptions

type RunOptions struct {
	// PreRefresh triggers a Refresh before Sync actions.
	PreRefresh bool
	// PreHardRefresh triggers a Hard Refresh before Sync actions.
	PreHardRefresh bool
	// Prune enables prune for sync.
	Prune  bool
	DryRun bool
	// ApplyOnly switches sync strategy to "apply".
	ApplyOnly bool
	// Force enables "force apply".
	Force bool
	// Wait makes sync wait until operation completes.
	Wait bool
	// WaitHealthy makes sync wait for health=Healthy.
	WaitHealthy  bool
	WaitTimeout  time.Duration
	PollInterval time.Duration

	Resources []SyncResource

	// application.status.resources
	ResourceStatuses []ResourceStatus
}

type SyncResource added in v0.0.3

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

SyncResource identifies a single Kubernetes resource for partial sync. It mirrors argocd's SyncOperationResource fields.

type Target

type Target struct {
	ClusterContext string
	App            AppKey
}

type TaskStatus

type TaskStatus string
const (
	TaskPending   TaskStatus = "pending"
	TaskRunning   TaskStatus = "running"
	TaskSuccess   TaskStatus = "success"
	TaskFailed    TaskStatus = "failed"
	TaskCancelled TaskStatus = "cancelled"
)

Jump to

Keyboard shortcuts

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