Documentation ¶
Index ¶
- func TempFileName(suffix string) string
- type Command
- type CommandGenerator
- func (c *CommandGenerator) GetArgs(command Command) []string
- func (c *CommandGenerator) GetArgumentValueOrAsk(arguments []string) []string
- func (c *CommandGenerator) GetEnvVarArgs(envVars []string) []string
- func (c *CommandGenerator) GetEnvVarsArguments(command Command) []string
- func (c *CommandGenerator) GetVolumeArgs(volumes []string) []string
- func (c *CommandGenerator) GetVolumeArguments(command Command) []string
- func (c *CommandGenerator) IsArgumentAskable(arg string) (substring string, ask bool)
- type CommandLogger
- type Config
- type DefaultConfig
- type EnvVarMaker
- type Parser
- type RunResult
- type Runner
- type SlackClient
- type SlackConfig
- type SlackGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TempFileName ¶
Types ¶
type Command ¶
type Command struct { EnvVars []string `yaml:"envvars"` WorkingDir string `yaml:"cwd"` ImageName string `yaml:"image_name"` Out string `yaml:"out"` Name string `yaml:"name"` Description string `yaml:"description"` Command string `yaml:"command"` Args []string `yaml:"args"` ReportTo []string `yaml:"report_to"` }
type CommandGenerator ¶
type CommandGenerator struct {
// contains filtered or unexported fields
}
func NewCommandGenerator ¶
func NewCommandGenerator(config *Config) *CommandGenerator
func (*CommandGenerator) GetArgs ¶
func (c *CommandGenerator) GetArgs(command Command) []string
func (*CommandGenerator) GetArgumentValueOrAsk ¶
func (c *CommandGenerator) GetArgumentValueOrAsk(arguments []string) []string
func (*CommandGenerator) GetEnvVarArgs ¶
func (c *CommandGenerator) GetEnvVarArgs(envVars []string) []string
func (*CommandGenerator) GetEnvVarsArguments ¶
func (c *CommandGenerator) GetEnvVarsArguments(command Command) []string
func (*CommandGenerator) GetVolumeArgs ¶
func (c *CommandGenerator) GetVolumeArgs(volumes []string) []string
func (*CommandGenerator) GetVolumeArguments ¶
func (c *CommandGenerator) GetVolumeArguments(command Command) []string
func (*CommandGenerator) IsArgumentAskable ¶
func (c *CommandGenerator) IsArgumentAskable(arg string) (substring string, ask bool)
type CommandLogger ¶
func NewCommandLogger ¶
func NewCommandLogger(command Command) *CommandLogger
func (*CommandLogger) LogCommandOutput ¶
func (c *CommandLogger) LogCommandOutput(out []byte) (string, error)
type Config ¶
type Config struct { Debug bool `yaml:"debug"` Slack SlackConfig `yaml:"slack"` Defaults DefaultConfig `yaml:"defaults"` Commands []Command `yaml:"commands"` CommandArgs []string `yaml:"command_args"` }
type DefaultConfig ¶
type EnvVarMaker ¶
type EnvVarMaker struct{}
func NewEnvVarMaker ¶
func NewEnvVarMaker() *EnvVarMaker
func (*EnvVarMaker) GetEnvVarValue ¶
func (m *EnvVarMaker) GetEnvVarValue(envVarName string) (string, error)
type Runner ¶
type Runner struct { Config *Config SlackClient *SlackClient SlackGenerator *SlackGenerator }
func (*Runner) RunCommands ¶
type SlackClient ¶
func NewSlackClient ¶
func NewSlackClient(config *Config) *SlackClient
func (*SlackClient) SendMessage ¶
func (c *SlackClient) SendMessage(message string) error
type SlackConfig ¶
type SlackGenerator ¶
type SlackGenerator struct{}
func NewSlackGenerator ¶
func NewSlackGenerator() *SlackGenerator
func (*SlackGenerator) GetSlackMessageForEnd ¶
func (g *SlackGenerator) GetSlackMessageForEnd(command Command, runErr error) string
func (*SlackGenerator) GetSlackMessageForStart ¶
func (g *SlackGenerator) GetSlackMessageForStart(command Command) string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.