cli

package
v0.0.0-...-8daec2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CityCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "city",
	ShortOpt: "y",
	Usage:    "City of the organization's address",
}}
View Source
var ContactTypeCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "contact-type",
	ShortOpt: "c",
	Usage:    fmt.Sprintf("Contact type of domain name admin. Default: %s", DefaultContactType),
}}
View Source
var DbPasswordCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "db-password",
	ShortOpt: "b",
	Usage:    "Password to use for the mysql database",
}}

Command options - the short options can be reused for different commands

View Source
var DomainCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "domain-name",
	ShortOpt: "d",
	Usage:    "Domain name to request ownership of e.g. your-domain-name-gamma.com",
}}
View Source
var ElbDomainNameCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "elb-domain-name",
	ShortOpt: "e",
	Usage:    "Domain name of the Elastic Load Balancer",
}}
View Source
var ElbHostedZoneCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "elb-hosted-zone",
	ShortOpt: "n",
	Usage:    "Hosted zone of the Elastic Load Balancer",
}}
View Source
var EmailCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "email",
	ShortOpt: "e",
	Usage:    "Email of domain name admin",
}}
View Source
var FirstNameCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "first-name",
	ShortOpt: "f",
	Usage:    "First name of domain name admin",
}}

For registering domain name

View Source
var HostedZoneIdCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "hosted-zone-id",
	ShortOpt: "z",
	Usage:    "Id of the hosted zone for the domain name",
}}
View Source
var LastNameCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "last-name",
	ShortOpt: "l",
	Usage:    "Last name of domain name admin",
}}
View Source
var OperationIdCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "operation-id",
	ShortOpt: "i",
	Usage:    "Operation ID obtained from registering a domain name",
}}
View Source
var OrgNameCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "organization-name",
	ShortOpt: "o",
	Usage:    "Organization name",
}}
View Source
var PhoneNumberCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "phone-number",
	ShortOpt: "n",
	Usage:    "Phone number of the organization",
}}
View Source
var PlayFrameworkSecretCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "play-framework-secret",
	ShortOpt: "f",
	Usage:    "A secret for the Play Framework to use. It can be anything.",
}}
View Source
var ProfileCliOpt = GlobalStringCliOption{&StringCliOptionImpl{
	LongOpt:  "profile",
	ShortOpt: "p",
	Usage:    fmt.Sprintf("AWS profile to use. Default: '%s'", defaultProfile),
}}

Global Options - do not re-use the short options

View Source
var RegionCliOpt = GlobalStringCliOption{&StringCliOptionImpl{
	LongOpt:  "region",
	ShortOpt: "r",
	Usage:    fmt.Sprintf("Region to use. Default: %s. Choices: %s", DefaultRegion, []Region{UsEast1, UsWest2}),
}}
View Source
var SslArnCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "ssl-arn",
	ShortOpt: "a",
	Usage:    "The AWS ARN of the SSL certificate created by AWS Certificate Manager",
}}
View Source
var StageCliOpt = GlobalStringCliOption{&StringCliOptionImpl{
	LongOpt:  "stage",
	ShortOpt: "s",
	Usage:    fmt.Sprintf("Stage to use: %s", []Stage{GammaStage, ProdStage}),
}}
View Source
var StateCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "state",
	ShortOpt: "x",
	Usage:    "State of the organization's address",
}}
View Source
var StreetAddressCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "street-address",
	ShortOpt: "t",
	Usage:    "Street address of the organization",
}}
View Source
var TwilioPasswordCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "twilio-password",
	ShortOpt: "w",
	Usage:    "Twilio account password",
}}
View Source
var TwilioPhoneCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "twilio-phone-number",
	ShortOpt: "n",
	Usage:    "Twilio account phone number",
}}
View Source
var TwilioUserCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "twilio-user",
	ShortOpt: "t",
	Usage:    "Twilio account user name",
}}
View Source
var ZipCodeCliOpt = CommandStringCliOption{&StringCliOptionImpl{
	LongOpt:  "zip-code",
	ShortOpt: "z",
	Usage:    "Zip code of the organization's address",
}}

Functions

This section is empty.

Types

type CliModels

type CliModels struct {
	Context *cli.Context
}

func (*CliModels) AlertSysConfig

func (cm *CliModels) AlertSysConfig() *AlertSysConfig

func (*CliModels) Aws

func (cm *CliModels) Aws() *Aws

func (*CliModels) CloudFormationClient

func (cm *CliModels) CloudFormationClient() *CloudFormationClient

type CommandStringCliOption

type CommandStringCliOption struct {
	*StringCliOptionImpl
}

Specific to commands

func (*CommandStringCliOption) IsAbsent

func (flag *CommandStringCliOption) IsAbsent(context *cli.Context) bool

func (*CommandStringCliOption) Value

func (flag *CommandStringCliOption) Value(context *cli.Context) string

func (*CommandStringCliOption) ValueOrDefault

func (flag *CommandStringCliOption) ValueOrDefault(context *cli.Context, defaultVal string) string

type GlobalStringCliOption

type GlobalStringCliOption struct {
	*StringCliOptionImpl
}

Options for all commands

func (*GlobalStringCliOption) IsAbsent

func (flag *GlobalStringCliOption) IsAbsent(context *cli.Context) bool

func (*GlobalStringCliOption) Value

func (flag *GlobalStringCliOption) Value(context *cli.Context) string

func (*GlobalStringCliOption) ValueOrDefault

func (flag *GlobalStringCliOption) ValueOrDefault(context *cli.Context, defaultVal string) string

type StringCliOption

type StringCliOption interface {
	Flag() cli.Flag
	Value(context *cli.Context) string
	IsAbsent(context *cli.Context) bool
	ExitError() error
}

Options here are used to generate the cli.Flag structs. The wrapper makes it explicit what the lookup key is in the context.

type StringCliOptionImpl

type StringCliOptionImpl struct {
	ShortOpt string
	LongOpt  string
	Usage    string
}

There are two ways to look up options based on whether they are a global option or part of a specific command. This struct provides the methods that are common to both.

func (*StringCliOptionImpl) ExitError

func (flag *StringCliOptionImpl) ExitError() error

func (*StringCliOptionImpl) Flag

func (flag *StringCliOptionImpl) Flag() cli.Flag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL