Documentation ¶
Overview ¶
Package config parses config and plugin configuration files. It provides APIs to read and write config files and manage multiple profiles.
Index ¶
- Constants
- type AuthConfig
- type AuthenticatorPluginConfig
- type Config
- func (c Config) ClientId() string
- func (c Config) ClientSecret() string
- func (c Config) ConfigureCredentialsAuth(clientId string, clientSecret string) bool
- func (c Config) ConfigureLoginAuth(clientId string, redirectUri string, scopes string) bool
- func (c *Config) ConfigureOrgTenant(organization string, tenant string) bool
- func (c Config) ConfigurePatAuth(pat string) bool
- func (c Config) Pat() string
- func (c Config) RedirectUri() string
- func (c Config) Scopes() string
- type ConfigProvider
- type ConfigStore
- type PluginConfig
- type PluginConfigProvider
- type PluginConfigStore
Constants ¶
const DefaultProfile = "default"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
AuthConfig with metadata used for authenticating the caller.
type AuthenticatorPluginConfig ¶ added in v1.0.3
AuthenticatorPluginConfig holds the information about how to execute the external authenticator. The Path to the external authenticator executable
type Config ¶
type Config struct { Uri *url.URL Organization string Tenant string Path map[string]string Query map[string]string Header map[string]string Auth AuthConfig Insecure bool Debug bool Output string }
The Config structure holds the config data from the selected profile.
func (Config) ClientSecret ¶ added in v1.0.1
func (Config) ConfigureCredentialsAuth ¶ added in v1.0.1
func (Config) ConfigureLoginAuth ¶ added in v1.0.1
func (*Config) ConfigureOrgTenant ¶ added in v1.0.1
func (Config) ConfigurePatAuth ¶ added in v1.0.2
func (Config) RedirectUri ¶ added in v1.0.1
type ConfigProvider ¶
type ConfigProvider struct { ConfigStore ConfigStore // contains filtered or unexported fields }
ConfigProvider parses the config file with the profiles.
func (ConfigProvider) Config ¶
func (cp ConfigProvider) Config(name string) *Config
func (*ConfigProvider) Load ¶
func (cp *ConfigProvider) Load() error
func (ConfigProvider) New ¶ added in v1.0.1
func (cp ConfigProvider) New() Config
type ConfigStore ¶ added in v1.0.17
ConfigStore reads and writes the configuration file
func (ConfigStore) Read ¶ added in v1.0.17
func (s ConfigStore) Read() ([]byte, error)
func (ConfigStore) Write ¶ added in v1.0.17
func (s ConfigStore) Write(data []byte) error
type PluginConfig ¶ added in v1.0.3
type PluginConfig struct {
Authenticators []AuthenticatorPluginConfig
}
PluginConfig keeps metadata about the configured plugins.
Currently supports only external authenticators. Example: https://github.com/UiPath/uipathcli-authenticator-k8s
type PluginConfigProvider ¶ added in v1.0.3
type PluginConfigProvider struct {
// contains filtered or unexported fields
}
PluginConfigProvider parses the plugin configuration file
func NewPluginConfigProvider ¶ added in v1.0.56
func NewPluginConfigProvider(store PluginConfigStore) *PluginConfigProvider
func (PluginConfigProvider) Config ¶ added in v1.0.17
func (cp PluginConfigProvider) Config() PluginConfig
func (*PluginConfigProvider) Load ¶ added in v1.0.17
func (cp *PluginConfigProvider) Load() error
type PluginConfigStore ¶ added in v1.0.17
type PluginConfigStore struct {
// contains filtered or unexported fields
}
PluginConfigStore reads the plugin configuration file
func NewPluginConfigStore ¶ added in v1.0.56
func NewPluginConfigStore(filePath string) *PluginConfigStore
func (PluginConfigStore) Read ¶ added in v1.0.17
func (s PluginConfigStore) Read() ([]byte, error)