Documentation
¶
Overview ¶
Package config manages CLI configuration and settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthFilePath ¶
AuthFilePath returns the credential file beside the configuration file.
Types ¶
type Config ¶
type Config struct {
Verbose bool `json:"verbose" mapstructure:"verbose"`
NoInteraction bool `json:"no_interaction" mapstructure:"no_interaction"`
CachePath string `json:"cache_path" mapstructure:"cache_path"`
Auth authConfig `json:"auth" mapstructure:"auth"`
OAuth OAuthConfig `json:"oauth" mapstructure:"oauth"`
}
Config holds CLI settings for output, interaction, cache, credential storage, and OAuth endpoints and credentials.
type OAuthConfig ¶
type OAuthConfig struct {
BaseURL string `json:"base_url" mapstructure:"base_url"`
ClientID string `json:"client_id" mapstructure:"client_id"`
Scopes []string `json:"scopes" mapstructure:"scopes"`
RedirectPath string `json:"redirect_path" mapstructure:"redirect_path"`
}
OAuthConfig holds the OAuth base URL, client ID, requested scopes, and local callback path.
func (*OAuthConfig) Endpoints ¶
func (cfg *OAuthConfig) Endpoints() *oauthEndpoints
Endpoints returns the OAuth endpoint URLs.
Click to show internal directories.
Click to hide internal directories.