Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ConfigDirName is the config directory name ConfigDirName = ".get3w" // RootConfigName is the name of root config file RootConfigName = "config.json" // Version is the version of cli Version = "0.0.1" )
Variables ¶
This section is empty.
Functions ¶
func DecodeAuth ¶
DecodeAuth decodes a base64 encoded string and returns username and password
func EncodeAuth ¶
func EncodeAuth(authConfig *AuthConfig) string
EncodeAuth creates a base64 encoded string to containing authorization information
Types ¶
type AuthConfig ¶
AuthConfig contains authorization information
type Config ¶
type Config struct { Auth string `json:"auth"` Apps []*get3w.App `json:"apps,omitempty"` AuthConfig AuthConfig `json:"-"` }
Config ~/.get3w/config.json file info
func LoadConfig ¶
LoadConfig reads the configuration files in the given directory, and sets up the auth config information and return values.
func LoadFromReader ¶
LoadFromReader is a convenience function that creates a Config object from a reader
func (*Config) LoadFromReader ¶
LoadFromReader reads the configuration data given and sets up the auth config information with given directory and populates the receiver object
Click to show internal directories.
Click to hide internal directories.