45 lines
1023 B
Go
45 lines
1023 B
Go
package www
|
|
|
|
import (
|
|
"golib.gaore.com/GaoreGo/haiwai-common-sdk-go/sdk"
|
|
"golib.gaore.com/GaoreGo/haiwai-common-sdk-go/sdk/requests"
|
|
)
|
|
|
|
const (
|
|
VERSION = "2020-09-24"
|
|
)
|
|
|
|
var HOST requests.Host = requests.Host{
|
|
Default: "apisdk.9ooo.cn",
|
|
Func: func(s string) string {
|
|
var a = map[string]string{
|
|
requests.RELEASE: "apisdk.9ooo.cn",
|
|
requests.PRE: "apisdk.9ooo.cn",
|
|
requests.TEST: "apisdk.9ooo.cn",
|
|
}
|
|
return a[s]
|
|
},
|
|
}
|
|
|
|
type Client struct {
|
|
sdk.Client
|
|
}
|
|
|
|
func NewClientWithAccessKey(accesskey, secrect, source string) (client *Client, err error) {
|
|
client = &Client{}
|
|
err = client.InitWithAccessKey(accesskey, secrect, source)
|
|
return
|
|
}
|
|
|
|
func NewClientWithAliAppcode(accesskey, secrect string, env ...string) (client *Client, err error) {
|
|
client = &Client{}
|
|
err = client.InitWithAliAppcode(accesskey, secrect, env...)
|
|
return
|
|
}
|
|
|
|
func (c *Client) GetUserInfo(req *GetPwdRequest) (response *GetPwdResponse, err error) {
|
|
response = CreateGetPwdResponse()
|
|
err = c.DoAction(req, response)
|
|
return
|
|
}
|