69c6020214
2.增加阿里(rali) 验签请求加密方式
43 lines
991 B
Go
43 lines
991 B
Go
package jedi
|
|
|
|
import (
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
|
"strings"
|
|
)
|
|
|
|
const (
|
|
HOST = "jedi.oapi.gaore.com"
|
|
VERSION = "2020-08-04"
|
|
)
|
|
|
|
type Client struct {
|
|
sdk.Client
|
|
}
|
|
|
|
func (c *Client) SendSms(req *SendSmsRequest) (response *SendSmsResponse, err error) {
|
|
if req.ParamsArray != nil && len(req.ParamsArray) > 0 {
|
|
req.Params = strings.Join(req.ParamsArray, ",,,")
|
|
}
|
|
response = CreateSendSmsResponse()
|
|
err = c.DoAction(req, response)
|
|
return
|
|
}
|
|
|
|
func (c *Client) Test(req *DemoTestRequest) (response *DemoTestResponse, err error) {
|
|
response = CreateDemoTestResponse()
|
|
err = c.DoAction(req, response)
|
|
return
|
|
}
|
|
|
|
func NewClientWithAccessKey(accesskey, secrect, source string) (client *Client, err error) {
|
|
client = &Client{}
|
|
err = client.InitWithAccessKey(accesskey, secrect, source)
|
|
return
|
|
}
|
|
|
|
func NewClientWithAliAppcode(accesskey, secrect string) (client *Client, err error) {
|
|
client = &Client{}
|
|
err = client.InitWithAliAppcode(accesskey, secrect)
|
|
return
|
|
}
|