Documentation
¶
Index ¶
Constants ¶
View Source
const ( DIR_NAME = ".cedana" FILE_NAME = "cli-config" FILE_TYPE = "json" DIR_PERM = 0o755 FILE_PERM = 0o644 ENV_PREFIX = "CEDANA_CLI" DEFAULT_SOCK_PERMS = 0o666 DEFAULT_LOG_LEVEL = "info" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// LogLevel is the default log level used by the server
LogLevel string `json:"log_level" key:"log_level" yaml:"log_level" mapstructure:"log_level"`
// Connection settings
Connection Connection `json:"connection" key:"connection" yaml:"connection" mapstructure:"connection"`
}
Cedana configuration. Each of the below fields can also be set through an environment variable with the same name, prefixed, and in uppercase. E.g. `Metrics.ASR` can be set with `CEDANA_METRICS_ASR`. The `env_aliases` tag below specifies alternative (alias) environment variable names (comma-separated).
var Global Config = Config{ Connection: Connection{ URL: "", AuthToken: "", }, }
The default global config. This will get overwritten by the config file or env vars during startup, if they exist.
type Connection ¶
type Connection struct {
// URL is your unique Cedana endpoint URL
URL string `json:"url" key:"url" yaml:"url" mapstructure:"url" env_aliases:"CEDANA_URL"`
// AuthToken is your authentication token for the Cedana endpoint
AuthToken string `json:"auth_token" key:"auth_token" yaml:"auth_token" mapstructure:"auth_token" env_aliases:"CEDANA_AUTH_TOKEN"`
}
Click to show internal directories.
Click to hide internal directories.