Documentation ¶
Index ¶
- Constants
- Variables
- func Combine(flags ...interface{}) []cli.Flag
- func GeneratedRepoUsage(format string) string
- func GetColor(c *cli.Context) (color string, err error)
- func ToUpper(c *cli.Context, flags ...*cli.StringFlag)
- func UsageOneOfOption(options []string) string
- type BoolWithInverse
- type BoolWithInverseFlag
- func (s *BoolWithInverseFlag) Apply(set *flag.FlagSet) error
- func (s *BoolWithInverseFlag) Flags() []cli.Flag
- func (s *BoolWithInverseFlag) IsSet() bool
- func (s *BoolWithInverseFlag) Names() []string
- func (s *BoolWithInverseFlag) RunAction(ctx *cli.Context) error
- func (s *BoolWithInverseFlag) String() string
- func (s *BoolWithInverseFlag) Value() bool
Constants ¶
View Source
const ColorNever = "never"
Variables ¶
View Source
var ( Memory = &cli.StringFlag{ Name: "memory", Aliases: []string{"me"}, Usage: "Max memory either in form 10GB or 10", } MemoryUnit = &cli.StringFlag{ Name: "memory-unit", Aliases: []string{"mu"}, Usage: "Unit if not provided with memory; " + UsageOneOfOption(common.SizeUnitTypes), } )
View Source
var ( Size = &cli.StringFlag{ Name: "size", Aliases: []string{"s"}, Usage: "Max size either in form 10GB or 10", } SizeUnit = &cli.StringFlag{ Name: "size-unit", Aliases: []string{"su"}, Usage: "Unit if not provided with size; " + UsageOneOfOption(common.SizeUnitTypes), } )
View Source
var Branch = &cli.StringFlag{ Name: "branch", Aliases: []string{"b"}, }
View Source
var Call = &cli.StringFlag{ Name: "call", Aliases: []string{"ca"}, Usage: "Exported function to call", }
View Source
var Clone = &BoolWithInverseFlag{
BoolFlag: &cli.BoolFlag{
Name: "clone",
Usage: "Clone an attached repository (Unused for generated repositories)",
},
}
View Source
var Color = &cli.StringFlag{ Name: "color", DefaultText: "auto", EnvVars: []string{"TAU_COLOR"}, }
View Source
var ColorOptions = []string{"never", "auto"}
View Source
var ( CommitMessage = &cli.StringFlag{ Name: "message", Aliases: []string{"m"}, Usage: "Commit message for a git commit", } )
View Source
var (
DefaultInverseBoolPrefix = "no-"
)
View Source
var Description = &cli.StringFlag{ Name: "description", Aliases: []string{"d"}, }
View Source
var Domains = &cli.StringSliceFlag{
Name: "domains",
Usage: "List of domains (comma, separated) by name or FQDN",
}
View Source
var EmbedToken = &BoolWithInverseFlag{ BoolFlag: &cli.BoolFlag{ Name: "embed-token", Aliases: []string{"e"}, Usage: "Embed git token into remote url", }, }
View Source
var EntryPoint = &cli.StringFlag{ Name: "entry-point", Aliases: []string{"ep"}, }
View Source
var Env = &cli.BoolFlag{ Name: "env", EnvVars: []string{"TAU_ENV"}, }
View Source
var GenerateRepo = &BoolWithInverseFlag{ BoolFlag: &cli.BoolFlag{ Name: "generate-repository", Aliases: []string{"g"}, Usage: "Create a new repository on your selected git provider", }, }
View Source
var Language = &cli.StringFlag{ Name: "language", Aliases: []string{"lang"}, Usage: "Template language; " + UsageOneOfOption(common.GetLanguages()), }
View Source
var List = &cli.BoolFlag{
Name: "list",
}
View Source
var Local = &BoolWithInverseFlag{ BoolFlag: &cli.BoolFlag{ Name: "local", Aliases: []string{"l"}, }, }
View Source
var Match = &cli.StringFlag{ Name: "match", Aliases: []string{"m"}, Usage: "[^regex] if configured or /path/to/match", }
View Source
var MatchRegex = &BoolWithInverseFlag{ BoolFlag: &cli.BoolFlag{ Name: "regex", Aliases: []string{"r"}, Usage: "Match using regex", }, }
View Source
var Name = &cli.StringFlag{ Name: "name", Aliases: []string{"n"}, }
View Source
var Path = &cli.StringFlag{ Name: "path", Aliases: []string{"p"}, }
View Source
var Paths = &cli.StringSliceFlag{ Name: "paths", Aliases: []string{"p"}, Usage: "HTTP paths to use for the endpoint", }
View Source
var Private = &BoolWithInverseFlag{
BoolFlag: &cli.BoolFlag{
Name: "private",
Usage: "Visibility of the generated repository",
},
}
View Source
var Provider = &cli.StringFlag{
Name: "provider",
DefaultText: "github",
Usage: "Git provider",
}
View Source
var RepositoryId = &cli.StringFlag{ Name: "repository-id", Aliases: []string{"repo-id"}, Usage: "Repository ID to use", }
View Source
var RepositoryName = &cli.StringFlag{ Name: "repository-name", Aliases: []string{"repo-n"}, Usage: "Name of a repository with current user or user/name full name of a repository", }
View Source
var Select = &cli.BoolFlag{
Name: "select",
Usage: "Ignore current and trigger a selection prompt",
}
View Source
var Source = &cli.StringFlag{
Name: "source",
Usage: "Path within the code folder or a library repository ex: . | libraries/<library>",
}
View Source
var Tags = &cli.StringSliceFlag{ Name: "tags", Aliases: []string{"t"}, }
View Source
var Template = &cli.StringFlag{ Name: "template", Usage: "See: " + templates.TemplateRepoURL, }
View Source
var Timeout = &cli.StringFlag{ Name: "timeout", Aliases: []string{"ttl"}, Usage: "Time to live for an instance", }
View Source
var UseCodeTemplate = &BoolWithInverseFlag{
BoolFlag: &cli.BoolFlag{
Name: "use-template",
},
}
View Source
var Yes = &cli.BoolFlag{ Name: "yes", Aliases: []string{"y"}, Usage: "Skip the confirmation prompt", }
Functions ¶
func GeneratedRepoUsage ¶
func ToUpper ¶
func ToUpper(c *cli.Context, flags ...*cli.StringFlag)
ToUpper takes a slice of StringFlag sets the values each flag to upper case if the flag is set
func UsageOneOfOption ¶
Types ¶
type BoolWithInverse ¶
type BoolWithInverseFlag ¶
type BoolWithInverseFlag struct { // The BoolFlag which the positive and negative flags are generated from *cli.BoolFlag // The prefix used to indicate a negative value // Default: `env` becomes `no-env` InversePrefix string // contains filtered or unexported fields }
func (*BoolWithInverseFlag) Flags ¶
func (s *BoolWithInverseFlag) Flags() []cli.Flag
func (*BoolWithInverseFlag) IsSet ¶
func (s *BoolWithInverseFlag) IsSet() bool
func (*BoolWithInverseFlag) Names ¶
func (s *BoolWithInverseFlag) Names() []string
func (*BoolWithInverseFlag) RunAction ¶
func (s *BoolWithInverseFlag) RunAction(ctx *cli.Context) error
func (*BoolWithInverseFlag) String ¶
func (s *BoolWithInverseFlag) String() string
Example for BoolFlag{Name: "env"} --env | --no-env Usage...
func (*BoolWithInverseFlag) Value ¶
func (s *BoolWithInverseFlag) Value() bool
Source Files ¶
- bool.go
- branch.go
- call.go
- clone.go
- color.go
- combine.go
- commit_message.go
- description.go
- domains.go
- embed.go
- entry_point.go
- env.go
- helpers.go
- language.go
- list.go
- local.go
- match.go
- memory.go
- name.go
- path.go
- paths.go
- private.go
- provider.go
- repository.go
- select.go
- size.go
- source.go
- tags.go
- template.go
- timeout.go
- types.go
- usage.go
- yes.go
Click to show internal directories.
Click to hide internal directories.