Documentation ¶
Index ¶
- type Bin
- type Check
- type Deps
- type Map
- type Output
- type Remove
- type Replace
- type Scope
- type Skip
- type Status
- type Trigger
- func (t *Trigger) CheckMatch() (m state.Map, ok bool)
- func (t *Trigger) ExecuteBins(s Scope)
- func (t *Trigger) Finish(s Scope)
- func (t *Trigger) Load(path string) error
- func (t *Trigger) Remove(s Scope) bool
- func (t *Trigger) Run(s Scope, prev, next state.Map) (ok bool)
- func (t *Trigger) ShouldSkip(s Scope, check, diff state.Map) bool
- func (t *Trigger) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bin ¶
type Bin struct { Task string `toml:"task"` Bin string `toml:"bin"` Args []string `toml:"args"` Replace *Replace `toml:"replace"` }
Bin contains the details of the binary to be executed.
type Check ¶
type Check struct {
Paths []string `toml:"paths"`
}
Check contains paths that must exixt to execute the configuration. This supports globbing.
type Deps ¶
type Deps struct {
After []string `toml:"after"`
}
Deps contains a description of the dependencies between triggers
type Map ¶
Map relates the name of trigger to its definition
type Output ¶
Output contains the details necessary to output the configuration details to the user.
type Replace ¶
Replace contains details to replace a single argument with a path in the executed binary. This supports globbing.
type Skip ¶
type Skip struct { Chroot bool `toml:"chroot,omitempty"` Live bool `toml:"live,omitempty"` Paths []string `toml:"paths"` }
Skip contains details for when the configuration will not be executed, due to existing paths, or possible flags passed. This supports globbing.
type Trigger ¶
type Trigger struct { Name string Path string Output []Output Description string `toml:"description"` Check *Check `toml:"check,omitempty"` Skip *Skip `toml:"skip,omitempty"` Deps *Deps `toml:"deps,omitempty"` Env map[string]string `toml:"env,omitempty"` Bins []Bin `toml:"bins,omitempty"` Removals []Remove `toml:"remove,omitempty"` }
Trigger contains all the information for a configuration to be executed and output to the user.
func (*Trigger) CheckMatch ¶
CheckMatch will glob the paths and if the path does not exist in the system, an error is returned
func (*Trigger) ExecuteBins ¶
ExecuteBins generates and runs all of the necesarry Bin commands
func (*Trigger) Finish ¶
Finish is the last function to be executed by any trigger to output details to the user.
func (*Trigger) ShouldSkip ¶
ShouldSkip will process the skip and check elements of the configuration and see if it should not be executed.