configuration

package
v0.0.0-...-2d7f00e Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(config Configuration) error

Types

type Configuration

type Configuration struct {
	Triggers []Trigger `json:"triggers,omitempty" yaml:"triggers,omitempty" mapstructure:"Triggers"`
}

func LoadBytes

func LoadBytes(configBytes []byte) (Configuration, error)

func LoadFile

func LoadFile(filePath string) (Configuration, error)

type Trigger

type Trigger struct {
	Name  string      `json:"name," yaml:"name" mapstructure:"Name"`
	Event string      `json:"event,omitempty" yaml:"event" mapstructure:"Event"`
	Rules TriggerRule `json:"rules,omitempty" yaml:"rules,omitempty" mapstructure:"Rules"`
	Run   TriggerRun  `json:"run,omitempty" yaml:"run,omitempty" mapstructure:"Run"`
}

type TriggerRule

type TriggerRule map[string]string

type TriggerRun

type TriggerRun struct {
	Path string   `json:"path," yaml:"path" mapstructure:"Path"`
	Args []string `json:"args,omitempty" yaml:"args,omitempty" mapstructure:"Args"`
	Dir  string   `json:"dir,omitempty" yaml:"dir" mapstructure:"Dir"`
}

Jump to

Keyboard shortcuts

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