state

package
v0.19.765 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsMap

func AsMap(i any) (map[string]any, error)

func NewSecretsState

func NewSecretsState() outputs.SyncSecretsOutput

Types

type AWSCloudAccount

type AWSCloudAccount struct {
	Region string `json:"region"`
}

type ActionWorkflowState

type ActionWorkflowState struct {
	Populated bool `json:"populated"`

	Status  string         `json:"status"`
	ID      string         `json:"id"`
	Outputs map[string]any `json:"outputs"`
}

func NewActionWorkflowState

func NewActionWorkflowState() *ActionWorkflowState

type ActionsState

type ActionsState struct {
	Populated bool `json:"populated"`

	Workflows map[string]*ActionWorkflowState `json:"workflows"`
}

func NewActionsState

func NewActionsState() *ActionsState

type AppState

type AppState struct {
	Populated bool `json:"populated"`

	Status    string            `json:"status"`
	ID        string            `json:"id"`
	Name      string            `json:"name"`
	Variables map[string]string `json:"variables"`
}

func NewAppState

func NewAppState() *AppState

type AzureCloudAccount

type AzureCloudAccount struct {
	Location string `json:"location"`
}

type CloudAccount

type CloudAccount struct {
	AWS   *AWSCloudAccount   `json:"aws"`
	Azure *AzureCloudAccount `json:"azure"`
}

func NewCloudAccount

func NewCloudAccount() *CloudAccount

type ComponentState

type ComponentState struct {
	Populated          bool                   `json:"populated"`
	Status             string                 `json:"status"`
	BuildID            string                 `json:"build_id"`
	ComponentID        string                 `json:"component_id"`
	InstallComponentID string                 `json:"install_component_id"`
	Name               string                 `json:"name"`
	Outputs            map[string]interface{} `json:"outputs" faker:"componentOutputs"`
}

func NewComponentState

func NewComponentState() *ComponentState

type ComponentsState

type ComponentsState struct {
	Populated bool `json:"populated"`

	Components map[string]*ComponentState `json:"components"`
}

func NewComponentsState

func NewComponentsState() *ComponentsState

type ComponentsStateLegacy

type ComponentsStateLegacy map[string]any

type DomainState

type DomainState struct {
	Populated bool `json:"populated"`

	PublicDomain   string `json:"public_domain"`
	InternalDomain string `json:"internal_domain"`
}

func NewDomainState

func NewDomainState() *DomainState

type InputsState

type InputsState struct {
	Populated bool              `json:"populated"`
	Inputs    map[string]string `json:"inputs"`
}

func NewInputsState

func NewInputsState() *InputsState

type InstallStackState

type InstallStackState struct {
	Populated bool `json:"populated"`

	QuickLinkURL string `json:"quick_link_url"`
	TemplateURL  string `json:"template_url"`
	TemplateJSON string `json:"template_json"`
	Checksum     string `json:"checksum"`
	Status       string `json:"status"`

	Outputs map[string]interface{} `json:"outputs"`
}

func NewInstallStackState

func NewInstallStackState() *InstallStackState

type InstallState

type InstallState struct {
	Populated bool   `json:"populated"`
	ID        string `json:"id"`
	Name      string `json:"name"`

	PublicDomain   string            `json:"public_domain"`
	InternalDomain string            `json:"internal_domain"`
	Sandbox        SandboxState      `json:"sandbox"`
	Inputs         map[string]string `json:"inputs"`
}

TODO(jm): this is going to be deprecated

func NewInstallState

func NewInstallState() *InstallState

type OCIArtifactOutputs

type OCIArtifactOutputs struct {
	Tag          string            `mapstructure:"tag"`
	Repository   string            `mapstructure:"repository"`
	MediaType    string            `mapstructure:"media_type"`
	Digest       string            `mapstructure:"digest"`
	Size         int64             `mapstructure:"size"`
	URLs         []string          `mapstructure:"urls"`
	Annotations  map[string]string `mapstructure:"annotations"`
	ArtifactType string            `mapstructure:"artifact_type"`
	Platform     Platform          `mapstructure:"platform"`
}

type OrgState

type OrgState struct {
	Status    string `json:"status"`
	Populated bool   `json:"populated"`
	ID        string `json:"id"`
	Name      string `json:"name"`
}

func NewOrgState

func NewOrgState() *OrgState

type Platform

type Platform struct {
	Architecture string   `mapstructure:"architecture"`
	OS           string   `mapstructure:"os"`
	OSVersion    string   `mapstructure:"os_version"`
	Variant      string   `mapstructure:"variant"`
	OSFeatures   []string `mapstructure:"os_features"`
}

type RunnerState

type RunnerState struct {
	Populated bool `json:"populated"`

	ID            string `json:"id"`
	RunnerGroupID string `json:"runner_group_id"`
	Status        string `json:"status"`
}

func NewRunnerState

func NewRunnerState() *RunnerState

type SandboxState

type SandboxState struct {
	Populated bool `json:"populated"`

	Status  string                 `json:"status"`
	Type    string                 `json:"type"`
	Version string                 `json:"version"`
	Outputs map[string]interface{} `json:"outputs" faker:"-"`

	RecentRuns []*SandboxState `json:"recent_runs"`
}

func NewSandboxState

func NewSandboxState() *SandboxState

type SecretsState

type SecretsState = outputs.SyncSecretsOutput

type State

type State struct {
	ID   string `json:"id"`
	Name string `json:"name"`

	Org          *OrgState          `json:"org"`
	App          *AppState          `json:"app"`
	Sandbox      *SandboxState      `json:"sandbox"`
	Inputs       *InputsState       `json:"inputs"`
	Actions      *ActionsState      `json:"actions"`
	Runner       *RunnerState       `json:"runner"`
	Components   map[string]any     `json:"components"`
	Domain       *DomainState       `json:"domain"`
	Cloud        *CloudAccount      `json:"cloud_account"`
	InstallStack *InstallStackState `json:"install_stack"`
	Secrets      *SecretsState      `json:"secrets"`

	// NOTE: for backwards compatibility, these are remaining in place.
	Install *InstallState `json:"install"`

	// loaded from the database but not part of the state itself
	StaleAt *time.Time `json:"stale_at"`
}

func New

func New() *State

func (State) AsMap

func (i State) AsMap() (map[string]interface{}, error)

func (State) GormDataType

func (State) GormDataType() string

func (*State) Scan

func (c *State) Scan(v interface{}) (err error)

Scan implements the database/sql.Scanner interface.

func (*State) Value

func (c *State) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

func (State) WorkflowSafeAsMap

func (i State) WorkflowSafeAsMap(ctx workflow.Context) (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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