Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePushData ¶ added in v1.1.3
DecodePushData : decode push data
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a dupco representing a instance
func NewBaseClient ¶ added in v1.0.7
NewBaseClient: create and return a new dupco
clientId identify of dupco secretKey key of secret secretVal value of secret
func NewDataClient ¶ added in v1.0.7
NewDataClient: create and return a new dupco
clientId identify of dupco secretKey key of secret secretVal value of secret
func (*Client) Call ¶
Call: call remote function
Response response from remote server response if valid if error is nil
func (*Client) EnableTestMode ¶
func (p *Client) EnableTestMode()
EnableTestMode: enable test mode
Warnning: if you call method with test mode ,the reponse will be different. So DO NOT use it on production mode
type Response ¶
type Response struct { // Code response code // // |code | describe | // |------|---------------------------------| // |0 | success | // |10000 | IP not in whitelist | // |10001 | Request path error | // |10002 | Internal server error | // |10100 | Param cilent_id required | // |10101 | Param client_id not found | // |10102 | This service is not activated | // |10200 | Secret key required | // |10201 | Secret not found | // |10202 | Decode failed | // |10203 | Get request body failed | // |10300 | Service not found | // |10999 | Other error | // // code 0 means success, others means errors Code int `json:"code"` // Msg the message of response // if code not 0, the msg will tell you the reason Msg string `json:"msg,omitempty"` // Data the data of response, The responses are different depending on the service // if code not 0, the data will be nil Data interface{} `json:"data,omitempty"` }
Response is the response of request
Click to show internal directories.
Click to hide internal directories.