config

package
v1.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 6 Imported by: 0

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

View Source
const DefaultProfile = "default"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Type   string
	Config map[string]interface{}
}

AuthConfig with metadata used for authenticating the caller.

type Config

type Config struct {
	Uri            *url.URL
	Organization   string
	Tenant         string
	Parameter      map[string]string
	Header         map[string]string
	Auth           AuthConfig
	Insecure       bool
	Debug          bool
	Output         string
	ServiceVersion string
}

The Config structure holds the config data from the selected profile.

func (Config) ClientId added in v1.0.1

func (c Config) ClientId() string

func (Config) ClientSecret added in v1.0.1

func (c Config) ClientSecret() string

func (Config) ConfigureCredentialsAuth added in v1.0.1

func (c Config) ConfigureCredentialsAuth(clientId string, clientSecret string) bool

func (Config) ConfigureLoginAuth added in v1.0.1

func (c Config) ConfigureLoginAuth(clientId string, redirectUri string, scopes string) bool

func (*Config) ConfigureOrgTenant added in v1.0.1

func (c *Config) ConfigureOrgTenant(organization string, tenant string) bool

func (Config) ConfigurePatAuth added in v1.0.2

func (c Config) ConfigurePatAuth(pat string) bool

func (Config) Pat added in v1.0.2

func (c Config) Pat() string

func (Config) RedirectUri added in v1.0.1

func (c Config) RedirectUri() string

func (Config) Scopes added in v1.0.1

func (c Config) Scopes() string

func (Config) SetAuthGrantType added in v1.0.68

func (c Config) SetAuthGrantType(grantType string)

func (Config) SetAuthProperty added in v1.0.68

func (c Config) SetAuthProperty(key string, value string)

func (Config) SetAuthScopes added in v1.0.68

func (c Config) SetAuthScopes(scopes string)

func (*Config) SetDebug added in v1.0.68

func (c *Config) SetDebug(debug bool)

func (Config) SetHeader added in v1.0.68

func (c Config) SetHeader(key string, value string)

func (*Config) SetInsecure added in v1.0.68

func (c *Config) SetInsecure(insecure bool)

func (Config) SetParameter added in v1.0.87

func (c Config) SetParameter(key string, value string)

func (*Config) SetServiceVersion added in v1.1.3

func (c *Config) SetServiceVersion(serviceVersion string)

func (*Config) SetUri added in v1.0.68

func (c *Config) SetUri(uri string) error

type ConfigFileStore added in v1.0.57

type ConfigFileStore struct {
	// contains filtered or unexported fields
}

ConfigFileStore reads and writes the configuration file

The config store is looking for the config file in "$HOME/.uipath/config" path.

func NewConfigFileStore added in v1.0.57

func NewConfigFileStore(filePath string) *ConfigFileStore

func NewConfigFileStoreWithData added in v1.0.57

func NewConfigFileStoreWithData(filePath string, data []byte) *ConfigFileStore

func (ConfigFileStore) Read added in v1.0.57

func (s ConfigFileStore) Read() ([]byte, error)

func (ConfigFileStore) Write added in v1.0.57

func (s ConfigFileStore) Write(data []byte) error

type ConfigProvider

type ConfigProvider struct {
	// contains filtered or unexported fields
}

ConfigProvider parses the config file with the profiles.

func NewConfigProvider added in v1.0.57

func NewConfigProvider(store ConfigStore) *ConfigProvider

func (ConfigProvider) Config

func (p ConfigProvider) Config(name string) *Config

func (*ConfigProvider) Load

func (p *ConfigProvider) Load() error

func (ConfigProvider) New added in v1.0.1

func (p ConfigProvider) New() Config

func (*ConfigProvider) Update

func (p *ConfigProvider) Update(profileName string, config Config) error

type ConfigStore added in v1.0.17

type ConfigStore interface {
	Read() ([]byte, error)
	Write(data []byte) error
}

ConfigStore provides an abstraction for reading and writing the config file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL