Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCannotSet = fmt.Errorf("cannot set the field")
ErrCannotSet is raised when there is an error trying to update a field
var ErrInvalidAlias = fmt.Errorf("invalid alias name (contains '/')")
ErrInvalidAlias is raised when encountering an invalid token in an alias name
var ErrInvalidSyntax = fmt.Errorf("invalid instruction format")
ErrInvalidSyntax is raised when encountering an invalid token
var ErrUnknownInstruction = fmt.Errorf("unknown instruction")
ErrUnknownInstruction is raised when encountering an unknown instruction it can mean that you're not using the right version or that you've misspelled it
Functions ¶
This section is empty.
Types ¶
type ExecutionContext ¶
type ExecutionContext struct { PackageManager pkg.PackageManager ServiceManager ser.ServiceManager Executor exec.Executor Alias map[string]string }
ExecutionContext contains system-specific drivers to manage the host
func CreateContext ¶
func CreateContext(_pkg, _ser string, _exec ...exec.Executor) (*ExecutionContext, error)
CreateContext creates an execution contet with the given package-manager and service-manager default values are taken from each go package (pkg, ser) if _exec is set, it will override the default (os) executor
type T ¶
type T interface { // Raw input line Raw() string // Build the instruction with input arguments Build(string) error // Exec the given instruction Exec(ExecutionContext) ([]byte, error) // DryRun checks the success of the given instruction without actually running it (non-destructive) DryRun(ExecutionContext) ([]byte, error) }
T is the instruction common interface