Documentation ¶
Index ¶
- func BuildOauthTokenParams(clientID, clientSecret, audience string) url.Values
- func BuildOauthTokenURL(domain string) string
- func Execute()
- func RunLogin(ctx context.Context, cli *cli, expired bool) error
- func WrappedInheritedFlagUsages(cmd *cobra.Command) string
- func WrappedLocalFlagUsages(cmd *cobra.Command) string
- func WrappedNonRequestParamsFlagUsages(cmd *cobra.Command) string
- func WrappedRequestParamsFlagUsages(cmd *cobra.Command) string
- type Argument
- func (a *Argument) Ask(cmd *cobra.Command, value interface{}) error
- func (a Argument) GetHelp() string
- func (a Argument) GetIsRequired() bool
- func (a Argument) GetLabel() string
- func (a Argument) GetName() string
- func (a *Argument) Pick(cmd *cobra.Command, result *string, fn pickerOptionsFunc) error
- type Flag
- func (f *Flag) Ask(cmd *cobra.Command, value interface{}, defaultValue *string) error
- func (f *Flag) AskBool(cmd *cobra.Command, value *bool, defaultValue *bool) error
- func (f *Flag) AskBoolU(cmd *cobra.Command, value *bool, defaultValue *bool) error
- func (f *Flag) AskMany(cmd *cobra.Command, value interface{}, defaultValue *string) error
- func (f *Flag) AskManyU(cmd *cobra.Command, value interface{}, defaultValue *string) error
- func (f *Flag) AskU(cmd *cobra.Command, value interface{}, defaultValue *string) error
- func (f *Flag) EditorPrompt(cmd *cobra.Command, value *string, initialValue, filename string, ...) error
- func (f *Flag) EditorPromptU(cmd *cobra.Command, value *string, initialValue, filename string, ...) error
- func (f *Flag) EditorPromptW(cmd *cobra.Command, value *string, initialValue, filename string, ...) error
- func (f Flag) GetHelp() string
- func (f Flag) GetIsRequired() bool
- func (f Flag) GetLabel() string
- func (f Flag) GetName() string
- func (f *Flag) IsSet(cmd *cobra.Command) bool
- func (f *Flag) RegisterBool(cmd *cobra.Command, value *bool, defaultValue bool)
- func (f *Flag) RegisterBoolU(cmd *cobra.Command, value *bool, defaultValue bool)
- func (f *Flag) RegisterInt(cmd *cobra.Command, value *int, defaultValue int)
- func (f *Flag) RegisterIntU(cmd *cobra.Command, value *int, defaultValue int)
- func (f *Flag) RegisterString(cmd *cobra.Command, value *string, defaultValue string)
- func (f *Flag) RegisterStringSlice(cmd *cobra.Command, value *[]string, defaultValue []string)
- func (f *Flag) RegisterStringSliceU(cmd *cobra.Command, value *[]string, defaultValue []string)
- func (f *Flag) RegisterStringU(cmd *cobra.Command, value *string, defaultValue string)
- func (f *Flag) Select(cmd *cobra.Command, value interface{}, options []string, defaultValue *string) error
- func (f *Flag) SelectU(cmd *cobra.Command, value interface{}, options []string, defaultValue *string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOauthTokenParams ¶
func BuildOauthTokenURL ¶
func RunLogin ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 Argument ¶ added in v0.3.0
func (Argument) GetIsRequired ¶ added in v0.3.0
type Flag ¶ added in v0.2.3
type Flag struct { Name string LongForm string ShortForm string Help string IsRequired bool AlwaysPrompt bool }