Documentation ¶
Index ¶
- func Bytes(n int) []byte
- func GenerateSha256(key, data string) string
- func GetCurrTime() int
- func GetDateNum() string
- func GetMD5String(strings string) string
- func HTTPQueryBuild(params map[string]string) string
- func Hex(n int) string
- func Md5ByByte(bytes []byte) string
- func QuerySortByKeyStr(m map[string]string) (str string)
- func QuerySortByKeyStr2(params map[string]string) (str string)
- func RandNum(min, max int) int
- func SortByKey(m map[string]string) (str []string)
- type HTTPClient
- func (c *HTTPClient) GetResponseByte() (body []byte, err error)
- func (c *HTTPClient) GetResponseJSON(response interface{}) error
- func (c *HTTPClient) HTTPGet(url string, params map[string]string) error
- func (c *HTTPClient) HTTPPost(url string, params map[string]string) error
- func (c *HTTPClient) HTTPPostJSON(url, jsonStr string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPQueryBuild ¶
HTTPQueryBuild http_query_build
func QuerySortByKeyStr ¶
QuerySortByKeyStr sign (using buffer could be better than string)
func QuerySortByKeyStr2 ¶
QuerySortByKeyStr2 query sort by key str2
Types ¶
type HTTPClient ¶
HTTPClient http's client
func (*HTTPClient) GetResponseByte ¶
func (c *HTTPClient) GetResponseByte() (body []byte, err error)
GetResponseByte get response byte
func (*HTTPClient) GetResponseJSON ¶
func (c *HTTPClient) GetResponseJSON(response interface{}) error
GetResponseJSON get response json
func (*HTTPClient) HTTPGet ¶
func (c *HTTPClient) HTTPGet(url string, params map[string]string) error
HTTPGet get method
func (*HTTPClient) HTTPPost ¶
func (c *HTTPClient) HTTPPost(url string, params map[string]string) error
HTTPPost post string
func (*HTTPClient) HTTPPostJSON ¶
func (c *HTTPClient) HTTPPostJSON(url, jsonStr string) error
HTTPPostJSON post json
Click to show internal directories.
Click to hide internal directories.