Documentation ¶
Index ¶
- Constants
- func ErrorString[T int | int64 | string](code T, msg string) string
- func GetBufferPool() *bytes.Buffer
- func GetOauthURL(appKey, rURI, state, scope string) string
- func GetStringsBuilder() *strings.Builder
- func GetUrlValues() url.Values
- func Json(obj interface{}) []byte
- func PutBufferPool(buf *bytes.Buffer)
- func PutStringsBuilder(b *strings.Builder)
- func PutUrlValues(vals url.Values)
- func StringsJoin(strs ...string) string
- type Client
- func (c *Client) Execute(req *Request, token string, rep IResponse) error
- func (c *Client) GenerateRawSign(params map[string]string) string
- func (c *Client) GenerateSign(stringToBeSigned string) string
- func (c *Client) GetAccessToken(code, state, redirectUri string) (string, error)
- func (c *Client) GetAccessTokenNew(code string) (string, error)
- func (c *Client) Logger() logger.Logger
- func (c *Client) PostExecute(req *Request, token string, rep IResponse) error
- func (c *Client) SetDev(dev bool)
- type Error
- type IResponse
- type Request
- type Response
Constants ¶
View Source
const ( API_VERSION = "2.0" GATEWAY_URL = "https://api.jd.com/routerjson" GATEWAY_DEV_URL = "https://api-dev.jd.com/routerjson" LOG_GATEWAY_URL = "https://api-log.jd.com/routerjson" UNION_GATEWAY_URL = "https://api.jd.com/routerjson" )
Variables ¶
This section is empty.
Functions ¶
func ErrorString ¶ added in v1.1.3
func GetBufferPool ¶ added in v1.1.3
func GetOauthURL ¶
func GetStringsBuilder ¶ added in v1.1.3
func GetUrlValues ¶ added in v1.1.3
func PutBufferPool ¶ added in v1.1.3
func PutStringsBuilder ¶ added in v1.1.3
func PutUrlValues ¶ added in v1.1.3
func StringsJoin ¶ added in v1.1.3
Types ¶
type Client ¶
func (*Client) GenerateSign ¶
func (*Client) GetAccessToken ¶
func (*Client) PostExecute ¶
Click to show internal directories.
Click to hide internal directories.