operations

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package operations validates and describes StackKits operation specs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovalMode

type ApprovalMode string
const (
	ApprovalImplicit ApprovalMode = "implicit"
	ApprovalRequired ApprovalMode = "required"
	ApprovalDenied   ApprovalMode = "denied"
)

type ApprovalPolicy

type ApprovalPolicy struct {
	Mode   ApprovalMode `json:"mode" yaml:"mode"`
	Reason string       `json:"reason,omitempty" yaml:"reason,omitempty"`
}

type Executor

type Executor string
const (
	ExecutorGo Executor = "go"
)

Only executors StackKits implements are named. Pulumi was removed with ADR-0019's supersession: the contract never had an executor behind it.

type OperationSpec

type OperationSpec struct {
	Name           string                    `json:"name" yaml:"name"`
	Phase          Phase                     `json:"phase" yaml:"phase"`
	Executor       Executor                  `json:"executor" yaml:"executor"`
	Stateful       bool                      `json:"stateful" yaml:"stateful"`
	Owner          Owner                     `json:"owner" yaml:"owner"`
	Provider       string                    `json:"provider,omitempty" yaml:"provider,omitempty"`
	Inputs         map[string]OperationValue `json:"inputs,omitempty" yaml:"inputs,omitempty"`
	Outputs        map[string]OperationValue `json:"outputs,omitempty" yaml:"outputs,omitempty"`
	SecretRefs     []string                  `json:"secret_refs,omitempty" yaml:"secret_refs,omitempty"`
	ApprovalPolicy ApprovalPolicy            `json:"approval_policy" yaml:"approval_policy"`
	StateScope     *StateScope               `json:"state_scope,omitempty" yaml:"state_scope,omitempty"`
}

func (OperationSpec) Validate

func (s OperationSpec) Validate() error

type OperationValue

type OperationValue struct {
	Ref   string `json:"ref,omitempty" yaml:"ref,omitempty"`
	Value any    `json:"value,omitempty" yaml:"value,omitempty"`
}

type OwnedResource

type OwnedResource struct {
	ID    string `json:"id" yaml:"id"`
	Kind  string `json:"kind" yaml:"kind"`
	Owner Owner  `json:"owner" yaml:"owner"`
}

type Owner

type Owner string
const (
	OwnerOpenTofu        Owner = "opentofu"
	OwnerStackKitRuntime Owner = "stackkit-runtime"
	OwnerExternal        Owner = "external"
)

type OwnershipManifest

type OwnershipManifest struct {
	Resources []OwnedResource `json:"resources" yaml:"resources"`
}

func (OwnershipManifest) Validate

func (m OwnershipManifest) Validate() error

type Phase

type Phase string
const (
	PhasePostApply  Phase = "post_apply"
	PhaseReconcile  Phase = "reconcile"
	PhaseUpgrade    Phase = "upgrade"
	PhasePreDestroy Phase = "pre_destroy"
)

type StateScope

type StateScope struct {
	Backend string `json:"backend" yaml:"backend"`
	Stack   string `json:"stack" yaml:"stack"`
}

Jump to

Keyboard shortcuts

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