Documentation ¶
Index ¶
- func AddAlias(service, key, value string) error
- func FetchEndpointsMap(endpoint string) (map[string]string, error)
- func GetAPIEndpoint(endpoint string) (string, error)
- func GetIdentityEndpoint(apiEndpoint string) (string, bool, error)
- func GetServiceEndpoint(config *Environments, serviceName string) (string, error)
- func GetSettingFilePath() (string, error)
- func ListAliases() (map[string]interface{}, error)
- func LoadAliases() (map[string]interface{}, error)
- func RemoveAlias(service, key string) error
- type Environment
- type Environments
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIEndpoint ¶
GetAPIEndpoint fetches the actual API endpoint from the config endpoint
func GetIdentityEndpoint ¶
GetIdentityEndpoint fetches the identity service endpoint from the API endpoint
func GetServiceEndpoint ¶
func GetServiceEndpoint(config *Environments, serviceName string) (string, error)
func GetSettingFilePath ¶
GetSettingFilePath returns the path to the setting file in the .cfctl directory
func ListAliases ¶
func LoadAliases ¶
func RemoveAlias ¶
Types ¶
type Environment ¶
type Environment struct { Endpoint string `yaml:"endpoint"` // gRPC or HTTP endpoint URL Proxy string `yaml:"proxy"` // Proxy server address if required Token string `yaml:"token"` // Authentication token }
Environment represents a single environment configuration
type Environments ¶
type Environments struct { Environment string `yaml:"environment"` // Current active environment Environments map[string]Environment `yaml:"environments"` // Map of available environments }
Environments represents the complete configuration structure
func SetSettingFile ¶
func SetSettingFile() (*Environments, error)
SetSettingFile loads the setting from the default location (~/.cfctl/setting.yaml)
Click to show internal directories.
Click to hide internal directories.