Documentation
¶
Overview ¶
cliconfig package will provide functions for getting the correct configuration for the client, it will correctly handling on disk configuration and overrides
Index ¶
Constants ¶
View Source
const ConfigPathEnvVarName = "MIACONFIG"
Variables ¶
This section is empty.
Functions ¶
func CacheFolderPath ¶
func CacheFolderPath() string
func ConfigFilePath ¶
func ConfigFilePath() string
func ConfigFilePathString ¶
func ConfigFilePathString() string
func CredentialsFilePath ¶
func CredentialsFilePath() string
Types ¶
type AuthReadWriter ¶
type AuthReadWriter struct {
// contains filtered or unexported fields
}
func NewAuthReadWriter ¶
func NewAuthReadWriter(locator *ConfigPathLocator, config *api.ContextConfig, auth *api.AuthConfig) *AuthReadWriter
func (*AuthReadWriter) ReadJWTToken ¶
func (rw *AuthReadWriter) ReadJWTToken() *oauth2.Token
func (*AuthReadWriter) WriteJWTToken ¶
func (rw *AuthReadWriter) WriteJWTToken(jwt *oauth2.Token)
type ConfigOverrides ¶
type ConfigPathLocator ¶
type ConfigPathLocator struct { ExplicitPath string // contains filtered or unexported fields }
func NewConfigPathLocator ¶
func NewConfigPathLocator() *ConfigPathLocator
func (*ConfigPathLocator) ConfigLocation ¶
func (cr *ConfigPathLocator) ConfigLocation() string
func (*ConfigPathLocator) DefaultConfigPath ¶
func (cr *ConfigPathLocator) DefaultConfigPath() string
func (*ConfigPathLocator) ReadConfig ¶
func (cr *ConfigPathLocator) ReadConfig() (*api.Config, error)
func (*ConfigPathLocator) WriteConfig ¶
func (cr *ConfigPathLocator) WriteConfig(config *api.Config) error
type ConfigReader ¶
type ConfigReader struct {
// contains filtered or unexported fields
}
func NewConfigReader ¶
func NewConfigReader(config *api.Config, overrides *ConfigOverrides) *ConfigReader
func (*ConfigReader) ClientConfig ¶
func (cr *ConfigReader) ClientConfig(locator *ConfigPathLocator) (*client.Config, error)
Click to show internal directories.
Click to hide internal directories.