Documentation ¶
Index ¶
- Variables
- func GetCmdFromVars(vars map[string]string, cmd string) (string, error)
- func ToFile(elk *Elk, filePath string) error
- type Dep
- type Elk
- func (e *Elk) Build() error
- func (e *Elk) GetFilePath() string
- func (e *Elk) GetTask(name string) (*Task, error)
- func (e *Elk) HasCircularDependency(name string, visitedNodes ...string) error
- func (e *Elk) HasTask(name string) bool
- func (e *Elk) LoadEnvFile() error
- func (e *Elk) SetFilePath(filepath string)
- type Log
- type Task
- type Vars
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCircularDependency = errors.New("circular dependency")
View Source
var ErrTaskNotFound = errors.New("task not found")
Functions ¶
Types ¶
type Elk ¶
type Elk struct { Version string Env map[string]string `yaml:"env"` Vars map[string]string `yaml:"vars"` EnvFile string `yaml:"env_file"` Tasks map[string]Task // contains filtered or unexported fields }
Elk is the structure of the application
func (*Elk) GetFilePath ¶ added in v0.6.0
GetFilePath get path used to create the object
func (*Elk) HasCircularDependency ¶
HasCircularDependency checks if a task has a circular dependency
func (*Elk) LoadEnvFile ¶
LoadEnvFile Log to the variable env the values
func (*Elk) SetFilePath ¶ added in v0.6.0
SetFilePath set the path used to create the object
type Task ¶
type Task struct { Title string `yaml:"title"` Tags []string `yaml:"tags"` Cmds []string `yaml:"cmds"` Env map[string]string `yaml:"env,omitempty"` Vars map[string]string `yaml:"vars,omitempty"` EnvFile string `yaml:"env_file,omitempty"` Description string `yaml:"description,omitempty"` Dir string `yaml:"dir,omitempty"` Log Log `yaml:"log,omitempty"` Sources string `yaml:"sources,omitempty"` Deps []Dep `yaml:"deps,omitempty"` IgnoreError bool `yaml:"ignore_error,omitempty"` }
Task is the data structure for the task to run
func (*Task) LoadEnvFile ¶
LoadEnvFile Log to the variable env the values
Click to show internal directories.
Click to hide internal directories.