package
1.6.23
Repository: https://github.com/mittacy/ego.git
Documentation: pkg.go.dev

# Functions

Client 获取新的resty.Client.
Decode 响应解析,map => struct 由于 mapstructure 解析时如果结构体存在时间将无法解析成功,所以此处添加一个钩子告诉mapstructure如何解析时间 @param input map数据 @param result struct结构体,需要指针 @param timeFormat 解析时间格式 默认为 []string{"2006-01-02 15:04:05", "2006-01-02T15:04:05Z07:00", "2006-01-02T15:04:05.999999999Z07:00"} @return error.
Get GET请求,返回数据为map结构 @param host 域名,example: https://www.baidu.com @param uri example: /user @param timeout 超时控制 example: time.Second*5 @return map[string]interface{} data结构数据 @return int 返回的业务状态码 @return error.
GetParams GET请求,返回数据为map结构 @param host 域名,example: https://www.baidu.com @param uri example: /user @param params 请求参数 @param timeout 超时控制 example: time.Second*5 @return map[string]interface{} data结构数据 @return int 返回的业务状态码 @return error.
GetParams GET请求,返回数据为map结构 @param host 域名,example: https://www.baidu.com @param uri example: /user @param params 请求参数 @param timeout 超时控制 example: time.Second*5 @return map[string]interface{} data结构数据 @return int 返回的业务状态码 @return error.
Get GET请求,返回数据为map结构 @param host 域名,example: https://www.baidu.com @param uri example: /user @param timeout 超时控制 example: time.Second*5 @return map[string]interface{} data结构数据 @return int 返回的业务状态码 @return error.
ParseTime 解析时间字符串为time.Time @param data 时间 @param format 可能的时间格式 @return time.Time @return error 如果格式错误,将返回 ErrTimeFormat.
Post
Post POST请求 @param host 域名,example: https://www.baidu.com @param uri example: /user @param body 请求体数据,struct/map/[]byte/…… @param timeout 超时控制 example: time.Second*5 @return map[string]interface{} data结构数据 @return int 返回的业务状态码 @return error.
Post POST请求 @param host 域名,example: https://www.baidu.com @param uri example: /user @param body 请求体数据,struct/map/[]byte/…… @param timeout 超时控制 example: time.Second*5 @return map[string]interface{} data结构数据 @return int 返回的业务状态码 @return error.

# Constants

No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

No description provided by the author