haiwai-common-sdk-go/services/callback/client.go

49 lines
920 B
Go
Raw Normal View History

2023-02-21 20:46:05 +08:00
package callback
import (
2023-02-21 20:58:53 +08:00
"golib.gaore.com/GaoreGo/haiwai-common-sdk-go/sdk"
"golib.gaore.com/GaoreGo/haiwai-common-sdk-go/sdk/requests"
2023-02-21 20:46:05 +08:00
)
const (
VERSION = "2021-11-30"
)
var HOST requests.Host = requests.Host{
Default: "callback.api.gaore.com",
2023-03-16 20:15:17 +08:00
Func: func(s string, area string) string {
2023-02-21 20:46:05 +08:00
var a = map[string]string{
requests.RELEASE: "callback.api.gaore.com",
requests.PRE: "callback.api.gaore.com",
requests.TEST: "callback.api.gaore.com",
}
return a[s]
},
}
type Client struct {
sdk.Client
}
func NewClient() (client *Client) {
client = &Client{}
client.InitWithAccessKey("", "", "")
return
}
// 上报关键行为
func (c *Client) SendAction(req *SendActionRequest) (response *SendActionResponse, err error) {
response = CreateSendActionResponse()
err = c.DoAction(req, response)
return
}
// 上报激活
func (c *Client) SendActive() {
}
// 上报付费
// 上报注册