22 lines
531 B
Go
22 lines
531 B
Go
|
package instruction
|
||
|
|
||
|
import (
|
||
|
"git.xdrm.io/xdrm-brackets/nix-amer/internal/cnf"
|
||
|
"git.xdrm.io/xdrm-brackets/nix-amer/internal/pkg"
|
||
|
"git.xdrm.io/xdrm-brackets/nix-amer/internal/ser"
|
||
|
)
|
||
|
|
||
|
// T is the instruction common interface
|
||
|
type T interface {
|
||
|
// Build the instruction with input arguments
|
||
|
Build(string) error
|
||
|
// Exec the given instruction
|
||
|
Exec(ExecutionContext) ([]byte, error)
|
||
|
}
|
||
|
|
||
|
type ExecutionContext struct {
|
||
|
PackageManager pkg.PackageManager
|
||
|
Configuration cnf.ConfigurationFormat
|
||
|
ServiceManager ser.ServiceManager
|
||
|
}
|