Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { Version string Branch string Commit string BuildTime string Closed chan struct{} Stdin io.Reader Stdout io.Writer Stderr io.Writer Logger log.Logger // contains filtered or unexported fields }
Command represents the command executed by "emailsender run".
func (*Command) ParseConfig ¶
ParseConfig parses the config at path. It returns a demo configuration if path is blank.
func (*Command) ParseFlags ¶
ParseFlags parses the command line flags from args and returns an options set.
type Config ¶
func NewDefaultConfig ¶
NewDefaultConfig returns the config that runs when no config is specified.
type Options ¶
Options represents the command line options that can be parsed.
func (*Options) GetConfigPath ¶
GetConfigPath returns the config path from the options. It will return a path by searching in this order:
- The CLI option in ConfigPath
- The environment variable ENGINE_CONFIG_PATH
- The first emailsender.toml file on the path: - ~/.emailsender - /etc/emailsender
type PrintConfigCommand ¶
PrintConfigCommand represents the command executed by "emailworker config".
func NewPrintConfigCommand ¶
func NewPrintConfigCommand() *PrintConfigCommand
NewPrintConfigCommand return a new instance of PrintConfigCommand.
func (*PrintConfigCommand) Run ¶
func (cmd *PrintConfigCommand) Run(args ...string) error
Run parses and prints the current config loaded.