cli

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildOauthTokenParams

func BuildOauthTokenParams(clientID, clientSecret, audience string) url.Values

func BuildOauthTokenURL

func BuildOauthTokenURL(domain string) string

func Execute

func Execute()

Execute is the primary entrypoint of the CLI app.

func RunLogin

func RunLogin(ctx context.Context, cli *cli, expired bool) error

RunLogin runs the login flow guiding the user through the process by showing the login instructions, opening the browser. Use `expired` to run the login from other commands setup: this will only affect the messages.

func WrappedInheritedFlagUsages

func WrappedInheritedFlagUsages(cmd *cobra.Command) string

WrappedInheritedFlagUsages returns a string containing the usage information for all flags which were inherited from parent commands, wrapped to the terminal's width.

func WrappedLocalFlagUsages

func WrappedLocalFlagUsages(cmd *cobra.Command) string

WrappedLocalFlagUsages returns a string containing the usage information for all flags specifically set in the current command, wrapped to the terminal's width.

func WrappedNonRequestParamsFlagUsages

func WrappedNonRequestParamsFlagUsages(cmd *cobra.Command) string

WrappedNonRequestParamsFlagUsages returns a string containing the usage information for all non-request parameters flags. The string is wrapped to the terminal's width.

func WrappedRequestParamsFlagUsages

func WrappedRequestParamsFlagUsages(cmd *cobra.Command) string

WrappedRequestParamsFlagUsages returns a string containing the usage information for all request parameters flags, i.e. flags used in operation commands to set values for request parameters. The string is wrapped to the terminal's width.

Types

type Flag added in v0.2.3

type Flag struct {
	Name       string
	LongForm   string
	ShortForm  string
	Help       string
	IsRequired bool
}

func (*Flag) Ask added in v0.2.3

func (f *Flag) Ask(cmd *cobra.Command, value interface{}) error

func (*Flag) AskU added in v0.2.3

func (f *Flag) AskU(cmd *cobra.Command, value interface{}) error

func (*Flag) RegisterString added in v0.2.3

func (f *Flag) RegisterString(cmd *cobra.Command, value *string, defaultValue string)

func (*Flag) RegisterStringSlice added in v0.2.5

func (f *Flag) RegisterStringSlice(cmd *cobra.Command, value *[]string, defaultValue []string)

func (*Flag) RegisterStringSliceU added in v0.2.5

func (f *Flag) RegisterStringSliceU(cmd *cobra.Command, value *[]string, defaultValue []string)

func (*Flag) RegisterStringU added in v0.2.3

func (f *Flag) RegisterStringU(cmd *cobra.Command, value *string, defaultValue string)

func (*Flag) Select added in v0.2.5

func (f *Flag) Select(cmd *cobra.Command, value interface{}, options []string) error

func (*Flag) SelectU added in v0.2.5

func (f *Flag) SelectU(cmd *cobra.Command, value interface{}, options []string) error

Jump to

Keyboard shortcuts

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