Documentation ¶
Index ¶
- Variables
- func DoHttpRequest(client *http.Client, req *http.Request) (*http.Response, error)
- func EmptyStrExists(vars ...string) bool
- func GetHttpResponseJson(resp *http.Response, result interface{}) error
- func GetLogLevel(logStr string) log.Level
- func GetLoginOptions() (string, string, string, error)
- func InitHttpClient() http.Client
- func InitHttpRequest(method string, url string, payload interface{}) (*http.Request, error)
- func InitLogger(filename string, levelStr string)
- func Log(levelStr string, message string)
- func PrettyPrint(data interface{}, pre string, post string)
- func URL(proto string, fqdn string, port string, uri ...string) string
- func UpdateHttpRequestHeaders(req *http.Request, headers map[string]string)
- func UpdateHttpRequestParams(req *http.Request, pairs map[string]string)
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger *log.Logger
Logger global log object
Functions ¶
func DoHttpRequest ¶
func EmptyStrExists ¶
func GetHttpResponseJson ¶
func GetLogLevel ¶
GetLogLevel Get the log level based on input string Valid string: panic fatal error warning info debug trace
func GetLoginOptions ¶
GetLoginOptions Get login information
func InitHttpClient ¶
func InitHttpRequest ¶
func InitLogger ¶
InitLogger Init global log object
func PrettyPrint ¶
PrettyPrint Print json to console elegantly, which is helpful for degbugging
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.