manifest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FileName is default manifest filename
	FileName = "gilbert.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	// Condition is shell command that should be successful to run specified job
	Condition string `yaml:"if,omitempty"`

	// Description is job description
	Description string `yaml:"description,omitempty"`

	// Task refers to task that should be run.
	Task string `yaml:"run,omitempty"`

	// Plugin describes what plugin should handle this job.
	Plugin string `yaml:"plugin,omitempty"`

	// Delay before task start in milliseconds
	Delay uint `yaml:"delay,omitempty"`

	// Vars is a set of variables defined for this job.
	Vars scope.Vars `yaml:"vars,omitempty"`

	// Params is a set of arguments for the job.
	Params map[string]interface{} `yaml:"params,omitempty"`
}

Job is a single job in task

func (*Job) HasDescription

func (j *Job) HasDescription() bool

HasDescription checks if description is available

func (*Job) InvokesPlugin

func (j *Job) InvokesPlugin() bool

InvokesPlugin checks if this job should invoke plugin

func (*Job) InvokesTask

func (j *Job) InvokesTask() bool

InvokesTask checks if this job should call another task

type Manifest

type Manifest struct {
	// Version is gilbert file format version
	Version string `yaml:"version"`

	// Imports is list of imported presets
	Imports []string `yaml:"imports,omitempty"`

	// Vars is a set of global variables
	Vars scope.Vars `yaml:"vars,omitempty"`

	// Tasks is a set of tasks
	Tasks TaskSet `yaml:"tasks,omitempty"`
	// contains filtered or unexported fields
}

Manifest represents manifest file (gilbert.yaml)

func FromDirectory added in v0.2.0

func FromDirectory(dir string) (m *Manifest, err error)

FromDirectory loads gilbert.yaml from specified directory

func UnmarshalManifest

func UnmarshalManifest(data []byte) (m *Manifest, err error)

UnmarshalManifest parses yaml contents into Manifest structure

func (*Manifest) Location added in v0.2.0

func (m *Manifest) Location() string

Location returns manifest file location, if it was loaded using FromDirectory method

type PluginConfigError

type PluginConfigError struct {
	PluginName    string
	OriginalError error
}

PluginConfigError is plugin configuration error

func NewPluginConfigError

func NewPluginConfigError(pluginName string, originalError error) *PluginConfigError

NewPluginConfigError creates a new PluginConfigError

func (*PluginConfigError) Error

func (p *PluginConfigError) Error() string

Error satisfies error interface

type RawParams

type RawParams map[string]interface{}

RawParams is raw plugin params

type Task

type Task []Job

Task is a group of jobs

type TaskSet

type TaskSet map[string]Task

TaskSet is a set of tasks declared in a manifest file

Jump to

Keyboard shortcuts

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