github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/internal/operator/boom/application/applications/reconciling/config/plugin/plugin.go (about)

     1  package plugin
     2  
     3  type Plugin struct {
     4  	Name     string   `yaml:"name"`
     5  	Init     *Command `yaml:"init,omitempty"`
     6  	Generate *Command `yaml:"generate,omitempty"`
     7  }
     8  
     9  type commandList struct {
    10  	Command string `yaml:"command,omitempty"`
    11  	Args    string `yaml:"args,omitempty"`
    12  }
    13  
    14  type Command struct {
    15  	Command []string `yaml:"command,omitempty,flow"`
    16  	Args    []string `yaml:"args,omitempty,flow"`
    17  }
    18  
    19  func New(name string, init *Command, generate *Command) *Plugin {
    20  	return &Plugin{
    21  		Name:     name,
    22  		Init:     init,
    23  		Generate: generate,
    24  	}
    25  }