Documentation
¶
Index ¶
- func ConfigAPIHub() (hub string)
- func ConfigAuthenticationHeader(httpReq *http.Request) (err error)
- func ConfigDir() string
- func ConfigFlagsProcess() (err error)
- func ConfigFlagsRegister(notecardFlags bool, notehubFlags bool)
- func ConfigNotecardHub() (hub string)
- func ConfigRead() error
- func ConfigReset()
- func ConfigSetHub(hub string)
- func ConfigShow() error
- func ConfigSignedIn() (username string, token string, authenticated bool)
- func ConfigWrite() error
- func FlagParse(notecardFlags bool, notehubFlags bool) (err error)
- type ConfigCreds
- type ConfigSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigAPIHub ¶ added in v1.4.3
func ConfigAPIHub() (hub string)
ConfigAPIHub returns the configured notehub, for use by the HTTP API. If none is configured it returns the default Blues API service. Regardless, it always makes sure that the host has "api." as a prefix. This enables flexibility in what's configured.
func ConfigAuthenticationHeader ¶ added in v1.4.3
ConfigAuthenticationHeader sets the authorization field in the header as appropriate
func ConfigFlagsProcess ¶
func ConfigFlagsProcess() (err error)
ConfigFlagsProcess processes the registered config flags
func ConfigFlagsRegister ¶
ConfigFlagsRegister registers the config-related flags
func ConfigNotecardHub ¶ added in v1.4.3
func ConfigNotecardHub() (hub string)
ConfigNotecardHub returns the configured notehub, for use as the Notecard host. If none is configured it returns "". Regardless, it always makes sure that the host does NOT have "api." as a prefix.
func ConfigSignedIn ¶ added in v1.4.3
ConfigSignedIn returns info about whether or not we're signed in
func ConfigWrite ¶
func ConfigWrite() error
ConfigWrite updates the file with the current config info
Types ¶
type ConfigCreds ¶ added in v1.4.6
type ConfigCreds struct {
User string `json:"user,omitempty"`
Token string `json:"token,omitempty"`
}
ConfigCreds are the credentials for a given notehub
type ConfigSettings ¶
type ConfigSettings struct {
When string `json:"when,omitempty"`
Hub string `json:"hub,omitempty"`
HubCreds map[string]ConfigCreds `json:"creds,omitempty"`
Interface string `json:"interface,omitempty"`
Port string `json:"port,omitempty"`
PortConfig int `json:"port_config,omitempty"`
}
ConfigSettings defines the config file that maintains the command processor's state
var Config ConfigSettings
Config are the master config settings