7
0

init project

This commit is contained in:
liangzy 2020-08-06 16:04:44 +08:00
parent d97f22ea0f
commit 9c2898517e
5 changed files with 48 additions and 17 deletions

View File

@ -251,6 +251,10 @@ func flatRepeatedList(reflectValue reflect.Value, request AcsRequest, position s
value = fieldDefault value = fieldDefault
} }
if value == "0" && fieldDefault != "" && fieldDefault != "0" {
value = fieldDefault
}
err = addParam(request, fieldPosition, name, value) err = addParam(request, fieldPosition, name, value)
} }
} }

View File

@ -17,6 +17,12 @@ func (c *Client) SendSms(req *SendSmsRequest) (response *SendSmsResponse, err er
return 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) { func NewClientWithAccessKey(accesskey, secrect, source string) (client *Client, err error) {
client = &Client{} client = &Client{}
err = client.InitWithAccessKey(accesskey, secrect, source) err = client.InitWithAccessKey(accesskey, secrect, source)

View File

@ -1,15 +0,0 @@
package jedi
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type DemoTestRequest struct {
*requests.RpcRequest
}
type DemoTestResponse struct {
*responses.BaseResponse
Data interface{} `json:"data"`
}

View File

@ -14,8 +14,8 @@ type SendSmsRequest struct {
} }
type SendSmsResponseData struct { type SendSmsResponseData struct {
Account string `json:"account"` Account string `json:"account"`
Createtime int64 `json:"createtime"` Total int `json:"total"`
} }
type SendSmsResponse struct { type SendSmsResponse struct {

View File

@ -0,0 +1,36 @@
package jedi
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type DemoTestRequest struct {
*requests.RpcRequest
Param1 string `position:"Query" field:"param_1" default:"" `
Param2 int `position:"Query" field:"param_2" default:"10086" `
Param3 bool `position:"Query" field:"param_3" default:"false" `
}
func CreateDemoTestRequest() (req *DemoTestRequest) {
req = &DemoTestRequest{RpcRequest: &requests.RpcRequest{}}
req.InitWithApiInfo(HOST, VERSION, "/api/sms/Index")
req.Method = requests.GET
return
}
type DemoTestResponse struct {
*responses.BaseResponse
Data DemoTestResponseData `json:"data"`
}
type DemoTestResponseData struct {
Account string `json:"account"`
Total int `json:"total"`
}
func CreateDemoTestResponse() *DemoTestResponse {
return &DemoTestResponse{
BaseResponse: &responses.BaseResponse{},
}
}