init project
This commit is contained in:
parent
d97f22ea0f
commit
9c2898517e
@ -251,6 +251,10 @@ func flatRepeatedList(reflectValue reflect.Value, request AcsRequest, position s
|
||||
value = fieldDefault
|
||||
}
|
||||
|
||||
if value == "0" && fieldDefault != "" && fieldDefault != "0" {
|
||||
value = fieldDefault
|
||||
}
|
||||
|
||||
err = addParam(request, fieldPosition, name, value)
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,12 @@ func (c *Client) SendSms(req *SendSmsRequest) (response *SendSmsResponse, err er
|
||||
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)
|
||||
|
@ -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"`
|
||||
}
|
@ -15,7 +15,7 @@ type SendSmsRequest struct {
|
||||
|
||||
type SendSmsResponseData struct {
|
||||
Account string `json:"account"`
|
||||
Createtime int64 `json:"createtime"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
type SendSmsResponse struct {
|
||||
|
36
services/jedi/test_demo.go
Normal file
36
services/jedi/test_demo.go
Normal 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{},
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user