7
0

Compare commits

..

No commits in common. "41056c6039ebeca02bea0dd671bc1dc3ab7ff417" and "1744de3d86ae8f10f3f55bf82bdffa4a69e8ef91" have entirely different histories.

3 changed files with 0 additions and 55 deletions

View File

@ -1,34 +0,0 @@
package asdk
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type AuthReq struct {
*requests.RpcRequest
}
type AuthResp struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
Uid int64 `json:"uid"`
UserName string `json:"user_name"`
} `json:"data"`
TraceId string `json:"trace_id"`
}
func CreateAuthReq(token string) *AuthReq {
req := &AuthReq{
RpcRequest: &requests.RpcRequest{},
}
req.InitWithApiInfo(HOST, VERSION, "/api/auth")
req.Method = requests.POST
req.FormParams = map[string]string{
"token": token,
}
return req
}

View File

@ -4,7 +4,6 @@ import (
"fmt" "fmt"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/utils" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/utils"
"time" "time"
) )
@ -46,11 +45,3 @@ func (c *Client) CreateKickUserReq(req *KickUserReq) (resp *KickUserResp, err er
} }
return return
} }
func (c *Client) Auth(req *AuthReq) (resp *AuthResp, err error) {
resp = &AuthResp{
BaseResponse: &responses.BaseResponse{},
}
err = c.DoAction(req, resp)
return
}

View File

@ -24,15 +24,3 @@ func TestKickUser(t *testing.T) {
} }
fmt.Println(resp.Code, resp.Msg, resp.Data) fmt.Println(resp.Code, resp.Msg, resp.Data)
} }
func TestAuth(t *testing.T) {
client, err := NewClient()
if err != nil {
t.Fatal(err)
}
resp, err := client.Auth(CreateAuthReq("t1w6rnlqxlYeSM3wAqVRljKDGVSTr9th"))
if err != nil {
t.Fatal(err)
}
t.Log(resp)
}