Documentation ¶
Index ¶
- type AccessToken
- type Client
- func (c *Client) GetJson(endpoint string, data ...interface{}) *gjson.Json
- func (c *Client) PostJson(endpoint string, data ...interface{}) *gjson.Json
- func (c *Client) RequestJson(method string, endpoint string, data ...interface{}) *gjson.Json
- func (c *Client) RequestPost(endpoint string, data ...interface{}) *gjson.Json
- func (c *Client) RequestRaw(method string, endpoint string, data ...interface{}) []byte
- type Response
- type Token
- type TokenCredentail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct { Cache *gcache.Cache // Appid string // Secret string TokenKey string //请求结果中 RequestTokenKey string //请求时的 获取token key 与请求时不一致时设置,例如第三方平台带小程序公众号请求 CacheKey string Credentials TokenCredentail EndPoint string RequestPostMethod bool Client *Client // contains filtered or unexported fields }
AccessToken
func (*AccessToken) GetRequestTokenKey ¶
func (at *AccessToken) GetRequestTokenKey() string
GetRequestTokenKey
func (*AccessToken) SetToken ¶
func (at *AccessToken) SetToken(token string, lifetime time.Duration) *AccessToken
SetToken
type Client ¶
type Client struct { Client *ghttp.Client BaseUri string UrlValues url.Values Logger *log.Logger Token auth.AccessToken }
func (*Client) GetJson ¶
//GetJson request by get method and return gjson.Json ***Deprecated use RequestJson instead
func (*Client) PostJson ¶
PostJson request by post method and return gjson.Json **** Deprecated use RequestJson instead
func (*Client) RequestJson ¶
request return json
func (*Client) RequestPost ¶
request Post retrun Json !!!上传文件图片 内容安全等接口用 配合 @file:
type TokenCredentail ¶
Click to show internal directories.
Click to hide internal directories.