Documentation ¶
Index ¶
- Variables
- func CleanAuth()
- func Execute()
- func SaveAuth(login, token, refreshToken string) error
- type Command
- func BuildCommand(parent *Command, runner CommandRunner, usage, description string, ...) *Command
- func CreateAccountCommand() *Command
- func CreateAliasCommand() *Command
- func CreateAuthCommand() *Command
- func CreateDomainCommand() *Command
- func CreateRecipientBccCommand() *Command
- func CreateSenderBccCommand() *Command
- func CreateVersionCommand() *Command
- type CommandOption
- type CommandRunner
Constants ¶
This section is empty.
Variables ¶
var EmailctlVersion = emailctl.Version{
Major: 0,
Minor: 2,
Patch: 0,
}
EmailctlVersion is emailctl's version.
Functions ¶
Types ¶
type Command ¶
Command is a wrapper for cobra.Command.
func BuildCommand ¶
func BuildCommand(parent *Command, runner CommandRunner, usage, description string, options ...CommandOption) *Command
BuildCommand creates a new Command.
func CreateAccountCommand ¶
func CreateAccountCommand() *Command
CreateAccountCommand creates an account command with all its sub-commands.
func CreateAliasCommand ¶
func CreateAliasCommand() *Command
CreateAliasCommand creates an alias command with all its sub-commands.
func CreateAuthCommand ¶
func CreateAuthCommand() *Command
CreateAuthCommand creates an auth command with its subcommands.
func CreateDomainCommand ¶
func CreateDomainCommand() *Command
CreateDomainCommand creates a domain command with all its sub-commands.
func CreateRecipientBccCommand ¶
func CreateRecipientBccCommand() *Command
CreateRecipientBccCommand creates the recipient-bcc command and its sub-commands.
func CreateSenderBccCommand ¶
func CreateSenderBccCommand() *Command
CreateSenderBccCommand creates the sender-bcc command and its sub-commands.
func CreateVersionCommand ¶
func CreateVersionCommand() *Command
CreateVersionCommand creates a version command
func (*Command) AddCommand ¶
AddCommand add child commands to the Command.
type CommandOption ¶
type CommandOption func(*Command)
CommandOption is an option to Command.
func AliasOption ¶
func AliasOption(alias string) CommandOption
AliasOption returns a CommandOption that sets an alias to the command.
func ArgsOption ¶
func ArgsOption(n int) CommandOption
ArgsOption returns a CommandOption that returns an error if there are not exactly n arguments.
func ArgsRangeOption ¶
func ArgsRangeOption(min, max int) CommandOption
ArgsRangeOption returns a CommandOption that returns an error if number of arguments passed to command is less than `min` or greater than `max`.