Documentation
¶
Index ¶
Constants ¶
const ( Ingest = "ingest" Personal = "personal" )
All available token types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ActiveDeployment string `toml:"active_deployment" envconfig:"deployment"` Deployments map[string]Deployment `toml:"deployments"` Insecure bool `toml:"-" envconfig:"insecure"` URLOverride string `toml:"-" envconfig:"url"` TokenOverride string `toml:"-" envconfig:"token"` OrganizationIDOverride string `toml:"-" envconfig:"org_id"` ConfigFilePath string `toml:"-"` // contains filtered or unexported fields }
Config is the global Axiom CLI configuration.
func Load ¶
Load the configuration. It behaves like LoadFromReader() but opens a file for reading the TOML configuration.
func LoadDefault ¶
LoadDefault tries to load the default configuration. It behaves like Load() but doesn't fail if the configuration file doesn't exist.
func LoadFromReader ¶
LoadFromReader loads configuration from an io.Reader. Configuration values loaded from the environment overwrite the ones from the TOML configuration. On error, the default configuration or the configuration processed till the error occurred is returned.
func (*Config) DeploymentAliases ¶
DeploymentAliases returns a sorted slice of deployment aliases.
func (*Config) GetActiveDeployment ¶
func (c *Config) GetActiveDeployment() (Deployment, bool)
GetActiveDeployment returns the configured deployment with overrides applied, if given.