Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface { GetType() string Run(context.Context, transport.Connection, config.Config) error // contains filtered or unexported methods }
func UnmarshalAction ¶
UnmarshalAction decodes an action into one of our action types using mapstructure
type ActionBase ¶
type ActionBase struct {
Type string
}
func (*ActionBase) GetType ¶
func (a *ActionBase) GetType() string
type AptAction ¶
type AptAction struct { ActionBase State string `mapstructure:"state"` Pkg []string `mapstructure:"pkg"` }
type FileAction ¶
type FileAction struct { ActionBase Src string `mapstructure:"src"` Dest string `mapstructure:"dest"` Owner string `mapstructure:"owner"` Group string `mapstructure:"group"` Mode string `mapstructure:"mode"` }
func (*FileAction) Run ¶
func (a *FileAction) Run(ctx context.Context, conn transport.Connection, conf config.Config) error
type ServiceAction ¶
type ServiceAction struct { ActionBase Name string `mapstructure:"name"` State string `mapstructure:"state"` }
func (*ServiceAction) Run ¶
func (a *ServiceAction) Run(ctx context.Context, conn transport.Connection, _ config.Config) error
type ShellAction ¶
type ShellAction struct { ActionBase // Use the generic tag "data" because this action is represented // as `key: string_value` in the playbook YAML Command string `mapstructure:"data"` }
func (*ShellAction) Run ¶
func (a *ShellAction) Run(ctx context.Context, conn transport.Connection, _ config.Config) error
type ValidateAction ¶
type ValidateAction struct { ActionBase Scheme string `mapstructure:"scheme"` Port uint `mapstructure:"port"` UrlPath string `yaml:"url_path" mapstructure:"url_path"` Retries uint `mapstructure:"retries"` Timeout time.Duration `mapstructure:"timeout"` StatusCode int `yaml:"status_code" mapstructure:"status_code"` BodyContent string `yaml:"body_content" mapstructure:"body_content"` }
func (*ValidateAction) Run ¶
func (a *ValidateAction) Run(ctx context.Context, conn transport.Connection, _ config.Config) error
Click to show internal directories.
Click to hide internal directories.