Documentation
¶
Index ¶
Constants ¶
View Source
const ( // 0700 is the permission for the configuration directory ConfigurationDirPerm = 0700 ConfigurationFilePerm = 0600 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Token string `yaml:"token"`
Endpoint string `yaml:"endpoint"`
// contains filtered or unexported fields
}
Config is the configuration for the application.
func (*Config) IsConfigValid ¶
IsConfigValid checks if the configuration is valid
func (*Config) LoadConfigFromEnvVar ¶
func (c *Config) LoadConfigFromEnvVar()
LoadConfigFromEnvVar loads the configuration from the environment variables
func (*Config) LoadConfigFromFile ¶
LoadConfigFromFile loads the configuration from a file
func (*Config) LoadConfiguration ¶
LoadConfiguration loads the configuration from the environment variables first If the configuration is not valid, it tries to load the configuration from the $HOME/.eph.yml file
func (*Config) SaveConfiguration ¶
func (*Config) SetHomedir ¶
SetHomedir sets the homedir variable It is used for testing purposes
Click to show internal directories.
Click to hide internal directories.