Documentation ¶
Index ¶
- type Application
- func (a *Application) Add() error
- func (a *Application) GetAdminAPIKey() (string, error)
- func (a *Application) GetFieldName(field string) string
- func (a Application) GetID() (string, error)
- func (a *Application) LoadDefault()
- func (a *Application) Remove() error
- func (a *Application) SetDefault() error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { Name string ID string `mapstructure:"application_id"` AdminAPIKey string `mapstructure:"admin_api_key"` Default bool `mapstructure:"default"` }
func (*Application) Add ¶
func (a *Application) Add() error
Add add an application to the configuration
func (*Application) GetAdminAPIKey ¶
func (a *Application) GetAdminAPIKey() (string, error)
func (*Application) GetFieldName ¶
func (a *Application) GetFieldName(field string) string
func (Application) GetID ¶
func (a Application) GetID() (string, error)
func (*Application) LoadDefault ¶
func (a *Application) LoadDefault()
func (*Application) Remove ¶
func (a *Application) Remove() error
Remove remove an application from the configuration
func (*Application) SetDefault ¶
func (a *Application) SetDefault() error
SetDefault set the default application
type Config ¶
type Config struct { ApplicationName string Application Application File string }
Config handles all overall configuration for the CLI
func (*Config) ApplicationNames ¶
ApplicationNames returns the list of name of the configured applications
func (*Config) ConfiguredApplications ¶
func (c *Config) ConfiguredApplications() []*Application
ConfiguredApplications return the applications in the configuration file
func (*Config) GetConfigFolder ¶
GetConfigFolder retrieves the folder where the configuration file is stored It searches for the xdg environment path first and will secondarily place it in the home directory
func (*Config) InitConfig ¶
func (c *Config) InitConfig()
InitConfig reads in profiles file and ENV variables if set.
Click to show internal directories.
Click to hide internal directories.