Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCsrfHeader ¶
AddCsrfHeader checks to see if cookie jar has Csrf and adds it as a header
func CURLThis ¶
CURLThis takes an http.Client and http.Request and outputs the equivalent cURL command, to be used elsewhere.
func DebugRequestHeader ¶
DebugRequestHeader outputs headers of an http.Request struct to the log
func DebugResponseHeader ¶
DebugResponseHeader outputs to the log the headers of an http.Response struct
Types ¶
type Configuration ¶
type Configuration struct {
URL string `json:"url" mapstructure:"url"`
Email string `json:"email" mapstructure:"email"`
Password string `json:"password" mapstructure:"password"`
Theme string `json:"theme" mapstructure:"theme"`
ConsoleUsername string `json:"consoleUsername" mapstructure:"console-username"`
LoginDomainID string `json:"loginDomainID"`
}
Configuration provides a simple struct to hold login info
func InitializeConfiguration ¶
func InitializeConfiguration(configLocation string, debug bool) (Configuration, error)
InitializeConfiguration reads config (or local.conf)
func ViperToConfiguration ¶
func ViperToConfiguration(configmap map[string]interface{}, debug bool) (Configuration, error)
ViperToConfiguration Takes in viper, returns Configuration object
type UserInfo ¶
type UserInfo struct {
UserName string `json:"userName"`
Status string `json:"status"`
AvatarURL string `json:"avatarURL"`
UserFDN string `json:"userFDN"`
LoginState string `json:"loginState"`
AuthTokenValidUntil string `json:"authTokenValidUntil"`
LoginDomainID string `json:"loginDomainId"`
PendingNotifications int `json:"pendingNotifications"`
}
UserInfo is the logged-in user's information
Click to show internal directories.
Click to hide internal directories.