witnesscommand

package
v0.1.138 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Argv              []string
	CachePolicy       string
	CredentialClass   string
	Cwd               string
	Environment       EnvironmentPolicy
	ExitCodePolicy    ExitCodePolicy
	ExpectedArtifacts []ExpectedArtifact
	ID                string
	NetworkPolicy     string
	ParallelGroup     string
	TimeoutMs         int
}

func Admit

func Admit(raw any, rawVocabulary any) (Command, error)

func AdmitWithVocabulary

func AdmitWithVocabulary(raw any, vocabulary Vocabulary) (Command, error)

func (Command) JSONValue

func (command Command) JSONValue() map[string]any

type EnvironmentClassPolicy

type EnvironmentClassPolicy struct {
	CachePolicies     []string
	CredentialClasses []string
	EnvironmentClass  string
	NetworkPolicies   []string
}

type EnvironmentPolicy

type EnvironmentPolicy struct {
	Allowlist []string
	Classes   []string
	Inherit   string
}

type ExitCodePolicy

type ExitCodePolicy struct {
	Kind         string
	SuccessCodes []int
}

type ExpectedArtifact

type ExpectedArtifact struct {
	Kind     string
	Path     string
	Required bool
}

type Plan

type Plan struct {
	Commands       []Command
	ParallelGroups []PlanGroup
}

func PlanCommands

func PlanCommands(commands []Command) (Plan, error)

func (Plan) JSONValue

func (plan Plan) JSONValue() map[string]any

type PlanGroup

type PlanGroup struct {
	CommandIDs    []string
	ParallelGroup string
}

type Vocabulary

type Vocabulary struct {
	ArtifactKinds                 []string
	CredentialClasses             []string
	EnvironmentClasses            []string
	EnvironmentClassPolicies      []EnvironmentClassPolicy
	MaxTimeoutMs                  int
	NonCacheableCredentialClasses []string
	ParallelGroups                []string
}

func AdmitVocabulary

func AdmitVocabulary(raw any) (Vocabulary, error)

Jump to

Keyboard shortcuts

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