Documentation ¶
Index ¶
- Constants
- func AddCommandWithConfigPreCheck(parentCmd *cobra.Command, cmd *cobra.Command)
- func ConfigPreCheck(cmd *cobra.Command, args []string) error
- func CreateConfigFile(home string, name string, ext string) (string, error)
- func CreateFakeConfigFile(t *testing.T) string
- func GetString(key string) string
- func InitConfig()
- func Set(key string, value interface{})
- func WriteAuthenticationConfig(clientId, clientSecret, apiEndpoint, tokenEndpoint string) error
Constants ¶
View Source
const ( ClientIdFlag string = "client-id" ClientSecretFlag string = "client-secret" APIEndpointFlag string = "api-endpoint" TokenEndpointFlag string = "token-endpoint" )
Common flags
Variables ¶
This section is empty.
Functions ¶
func AddCommandWithConfigPreCheck ¶
addCommandWithConfigPreCheck adds a command to the parentCmd configuring a PreRunE function to ensure the configure command is executed before any other command
func ConfigPreCheck ¶
configPreCheck verifies if the base configuration is set
func CreateConfigFile ¶
CreateConfigFile creates the config file if it does not exist
func CreateFakeConfigFile ¶
CreateFakeConfigFile configures viper to write to a temporary file
func WriteAuthenticationConfig ¶
WriteAuthenticationConfig persists the authentication configuration
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.