state

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PersistStateToFile

func PersistStateToFile(stateFile string, state ActionStateContext)

Types

type ActionArtifact

type ActionArtifact struct {
	BuildID       string `json:"build_id"`
	JobID         string `json:"job_id"`
	ArtifactID    string `json:"id"`
	Module        string `json:"module"`
	Type          string `json:"type"`
	Name          string `json:"name"`
	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 added in v0.2.0

func GetStateFromDirectory(stateDirectory string) ActionStateContext

func GetStateFromFile

func GetStateFromFile(stateFile string) ActionStateContext

func MergeStates added in v0.2.0

func MergeStates(state1 ActionStateContext, state2 ActionStateContext) ActionStateContext

type AuditEvents added in v0.2.0

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