Documentation ¶
Index ¶
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"` }
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) Remove ¶
func (a *Application) Remove() error
Remove remove an application from the configuration
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.