41 lines
828 B
Go
41 lines
828 B
Go
|
package passport
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"golib.gaore.com/GaoreGo/haiwai-common-sdk-go/sdk"
|
||
|
"golib.gaore.com/GaoreGo/haiwai-common-sdk-go/sdk/requests"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
VERSION = "2023-04-18"
|
||
|
KEY = "#gr*%com#"
|
||
|
)
|
||
|
|
||
|
var Host = requests.Host{
|
||
|
Default: "passport.gaore.com.hk",
|
||
|
Func: func(s string, area string) string {
|
||
|
if area != "" {
|
||
|
fmt.Println("passport.gaore.com." + area)
|
||
|
return "passport.gaore.com." + area
|
||
|
}
|
||
|
return "passport.gaore.com.hk"
|
||
|
},
|
||
|
}
|
||
|
|
||
|
type Client struct {
|
||
|
sdk.Client
|
||
|
ident string
|
||
|
}
|
||
|
|
||
|
func (c *Client) GetRegDeviceByUsers(req *RegDeviceRequest) (resp *RegDeviceResponse, err error) {
|
||
|
resp = CreateRegDeviceResponse()
|
||
|
err = c.DoAction(req, resp)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
func NewClient(area string, env ...string) (client *Client, err error) {
|
||
|
client = new(Client)
|
||
|
err = client.InitWithArea(area, env...)
|
||
|
return
|
||
|
}
|