models

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	Remote EnvRemote         `yaml:"remote,omitempty"`
	Vars   map[string]EnvVar `yaml:"vars,omitempty"`
}

func (Env) HasRemote added in v0.0.5

func (e Env) HasRemote() bool

func (Env) HasVars added in v0.0.5

func (e Env) HasVars() bool

type EnvRemote

type EnvRemote struct {
	Type string `yaml:"type"`
	Key  string `yaml:"key"`
}

type EnvVar

type EnvVar struct {
	Source string `yaml:"source,omitempty"`
	Key    string `yaml:"key,omitempty"`
	Value  string `yaml:"value,omitempty"`
}

type Job

type Job struct {
	Name       string   `yaml:"name"`
	WorkingDir string   `yaml:"working_dir,omitempty"`
	Command    string   `yaml:"command"`
	Args       []string `yaml:"args,omitempty"`
	Env        Env      `yaml:"env,omitempty"`
}

func (*Job) FromYAML added in v0.0.5

func (j *Job) FromYAML(by []byte) error

func (*Job) ToJobConfig

func (j *Job) ToJobConfig(envs map[string]string) *JobConfig

func (*Job) ToYAML

func (j *Job) ToYAML() string

type JobConfig

type JobConfig struct {
	Name       string   `yaml:"name"`
	WorkingDir string   `yaml:"working_dir,omitempty"`
	Command    string   `yaml:"command"`
	Args       []string `yaml:"args,omitempty"`
	Env        map[string]string
}

func (JobConfig) ToYAML

func (j JobConfig) ToYAML() string

type Jobs

type Jobs struct {
	DefaultStage string           `yaml:"default_stage"`
	Jobs         map[string][]Job `yaml:"jobs"`
}

func (*Jobs) FromYAML added in v0.0.5

func (j *Jobs) FromYAML(by []byte) error

func (*Jobs) ToYAML added in v0.0.5

func (j *Jobs) ToYAML() string

Jump to

Keyboard shortcuts

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