config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_HOME      = "/home"
	INPUT_TEXT        = "text"
	INPUT_SELECT      = "select"
	INSERT_BEGIN      = "begin"
	INSERT_END        = "end"
	INSERT_UNIQUE     = "unique"
	RUNTIME_NATIVE    = "native"
	RUNTIME_CONTAINER = "container"
	LOG_FATAL         = "fatal"
	LOG_ERROR         = "error"
	LOG_WARN          = "warn"
	LOG_INFO          = "info"
	LOG_DEBUG         = "debug"
	LOG_TRACE         = "trace"
)

Variables

This section is empty.

Functions

func WriteDredgeFile added in v0.0.3

func WriteDredgeFile(dredgeFile *DredgeFile, filename SourcePath) error

Types

type BrowserStep added in v0.0.3

type BrowserStep struct {
	Url string
}

func (BrowserStep) Validate added in v0.0.3

func (b BrowserStep) Validate() error

type Bucket added in v0.0.2

type Bucket struct {
	Name        string
	Description string        `yaml:",omitempty"`
	Workflows   []Workflow    `yaml:",omitempty"`
	Import      *ImportBucket `yaml:",omitempty"`
}

func (Bucket) Validate added in v0.0.3

func (b Bucket) Validate() error

type ConfirmStep added in v0.0.7

type ConfirmStep struct {
	Message string
}

func (ConfirmStep) Validate added in v0.0.7

func (c ConfirmStep) Validate() error

type DredgeFile

type DredgeFile struct {
	Variables Variables  `yaml:",omitempty"`
	Runtimes  []Runtime  `yaml:",omitempty"`
	Workflows []Workflow `yaml:",omitempty"`
	Buckets   []Bucket   `yaml:",omitempty"`
	Resources Resources  `yaml:",omitempty"`
}

func NewDredgeFile added in v0.0.3

func NewDredgeFile(buf []byte) (*DredgeFile, error)

func (*DredgeFile) Validate added in v0.0.3

func (dredgeFile *DredgeFile) Validate() error

type EditDredgeFileStep added in v0.0.3

type EditDredgeFileStep struct {
	AddVariables Variables  `yaml:"add_variables,omitempty"`
	AddWorkflows []Workflow `yaml:"add_workflows,omitempty"`
	AddBuckets   []Bucket   `yaml:"add_buckets,omitempty"`
}

func (EditDredgeFileStep) Validate added in v0.0.3

func (e EditDredgeFileStep) Validate() error

type ExecuteStep added in v0.0.7

type ExecuteStep struct {
	Resource string
	Command  string
	Register string `yaml:",omitempty"`
}

func (ExecuteStep) Validate added in v0.0.7

func (e ExecuteStep) Validate() error

type IfStep added in v0.0.6

type IfStep struct {
	Cond  string
	Steps []Step `yaml:",omitempty"`
}

func (IfStep) Validate added in v0.0.6

func (i IfStep) Validate() error

type ImportBucket added in v0.0.3

type ImportBucket struct {
	Source SourcePath
	Bucket string
}

func (ImportBucket) Validate added in v0.0.3

func (i ImportBucket) Validate() error

type ImportWorkflow added in v0.0.3

type ImportWorkflow struct {
	Source   SourcePath
	Bucket   string
	Workflow string
}

func (ImportWorkflow) Validate added in v0.0.3

func (i ImportWorkflow) Validate() error

type Input added in v0.0.4

type Input struct {
	Name         string
	Description  string   `yaml:",omitempty"`
	Type         string   `yaml:",omitempty"`
	Values       []string `yaml:",omitempty"`
	DefaultValue string   `yaml:"default_value,omitempty"`
	Skip         string   `yaml:",omitempty"`
}

func (Input) HasValue added in v0.0.4

func (i Input) HasValue(value string) bool

func (Input) Validate added in v0.0.4

func (i Input) Validate() error

type Insert added in v0.0.5

type Insert struct {
	Section   string `yaml:",omitempty"`
	Placement string `yaml:",omitempty"`
}

func (Insert) Validate added in v0.0.5

func (i Insert) Validate() error

type LogStep added in v0.0.7

type LogStep struct {
	Level   string
	Message string
}

func (LogStep) Validate added in v0.0.7

func (l LogStep) Validate() error

type Resource added in v0.0.7

type Resource []ResourceProvider

type ResourceProvider added in v0.0.7

type ResourceProvider struct {
	Provider string
	Config   map[string]string `yaml:",omitempty"`
}

type Resources added in v0.0.7

type Resources map[string]Resource

type Runtime

type Runtime struct {
	Name        string
	Type        string
	Image       string            `yaml:",omitempty"`
	Home        string            `yaml:",omitempty"`
	Cache       []string          `yaml:",omitempty"`
	GlobalCache []string          `yaml:"global_cache,omitempty"`
	Ports       []string          `yaml:",omitempty"`
	EnvVars     map[string]string `yaml:",omitempty"`
}

func (Runtime) GetHome

func (r Runtime) GetHome() string

func (Runtime) Validate added in v0.0.6

func (r Runtime) Validate() error

type SetStep added in v0.0.7

type SetStep map[string]string

func (SetStep) Validate added in v0.0.7

func (s SetStep) Validate() error

type ShellStep

type ShellStep struct {
	Cmd     string
	Runtime string `yaml:",omitempty"`
	StdOut  string `yaml:"stdout,omitempty"`
	StdErr  string `yaml:"stderr,omitempty"`
}

func (ShellStep) Validate added in v0.0.3

func (s ShellStep) Validate() error

type SourcePath added in v0.0.3

type SourcePath string

type Step

type Step struct {
	Name           string              `yaml:",omitempty"`
	Shell          *ShellStep          `yaml:",omitempty"`
	Template       *TemplateStep       `yaml:",omitempty"`
	Browser        *BrowserStep        `yaml:",omitempty"`
	EditDredgeFile *EditDredgeFileStep `yaml:"edit_dredgefile,omitempty"`
	If             *IfStep             `yaml:",omitempty"`
	Execute        *ExecuteStep        `yaml:",omitempty"`
	Set            *SetStep            `yaml:",omitempty"`
	Log            *LogStep            `yaml:",omitempty"`
	Confirm        *ConfirmStep        `yaml:",omitempty"`
}

func (Step) Validate

func (s Step) Validate() error

type TemplateStep

type TemplateStep struct {
	Source SourcePath `yaml:",omitempty"`
	Input  string     `yaml:",omitempty"`
	Dest   string
	Insert *Insert `yaml:",omitempty"`
}

func (TemplateStep) Validate added in v0.0.3

func (t TemplateStep) Validate() error

type Variables added in v0.0.3

type Variables map[string]string

type Workflow

type Workflow struct {
	Name        string
	Description string          `yaml:",omitempty"`
	Inputs      []Input         `yaml:",omitempty"`
	Steps       []Step          `yaml:",omitempty"`
	Import      *ImportWorkflow `yaml:",omitempty"`
}

func (Workflow) Validate added in v0.0.3

func (w Workflow) Validate() error

Jump to

Keyboard shortcuts

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