state

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteStateFile

func WriteStateFile(stateFile string, state ActionStateContext) error

Types

type ActionArtifact

type ActionArtifact struct {
	BuildID       string `json:"build_id"`
	JobID         string `json:"job_id"`
	StepSlug      string `json:"step_slug"`
	ArtifactID    string `json:"id"`
	Module        string `json:"module"`
	Type          string `json:"type"`
	Name          string `json:"name"`
	Path          string `json:"path"`
	Format        string `json:"format"`
	FormatVersion string `json:"format_version"`
	SHA256        string `json:"sha256"`
}

ActionArtifact contains information about generated artifacts

type ActionStateContext

type ActionStateContext struct {
	// Version of the serialized action state
	Version int `json:"version"`

	// Modules contains the project modules
	Modules []*analyzerapi.ProjectModule

	// Artifacts
	Artifacts map[string]ActionArtifact `json:"artifacts"`

	// Steps holds a list of all steps that were part of the pipeline
	AuditLog []AuditEvents `json:"audit_events"`
}

ActionStateContext holds state information about executed actions / results (ie. generated artifacts)

func GetStateFromDirectory

func GetStateFromDirectory(stateDirectory string) ActionStateContext

func GetStateFromFile

func GetStateFromFile(stateFile string) ActionStateContext

func ReadStateFile

func ReadStateFile(stateFile string) (ActionStateContext, error)

type AuditEvents

type AuditEvents struct {
	Timestamp time.Time         `json:"timestamp"`
	Type      string            `json:"type"`
	Payload   map[string]string `json:"payload"`
}

AuditEvents contains information about all steps that were part of the build and deployment process

Jump to

Keyboard shortcuts

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