From d4710611912b6f4c6f1e6a62f4c9877b8fa42cd5 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 2 Mar 2021 09:21:47 +0000 Subject: [PATCH] fix(deps): update module github.com/aliyun/alibaba-cloud-sdk-go to v1.61.959 --- go.mod | 2 +- go.sum | 2 + .../aliyun/alibaba-cloud-sdk-go/sdk/client.go | 44 +++---- .../aliyun/alibaba-cloud-sdk-go/sdk/config.go | 2 +- .../sdk/endpoints/endpoints_config.go | 54 +-------- .../sdk/requests/common_request.go | 10 +- .../sdk/requests/roa_request.go | 4 +- .../services/dysmsapi/add_short_url.go | 108 ++++++++++++++++++ .../services/dysmsapi/add_sms_sign.go | 10 +- .../services/dysmsapi/add_sms_template.go | 8 +- .../services/dysmsapi/create_short_param.go | 106 +++++++++++++++++ .../services/dysmsapi/delete_short_url.go | 105 +++++++++++++++++ .../services/dysmsapi/delete_sms_sign.go | 8 +- .../services/dysmsapi/delete_sms_template.go | 8 +- .../services/dysmsapi/modify_sms_sign.go | 10 +- .../services/dysmsapi/modify_sms_template.go | 8 +- .../services/dysmsapi/query_send_details.go | 8 +- .../services/dysmsapi/query_short_url.go | 106 +++++++++++++++++ .../services/dysmsapi/query_sms_sign.go | 8 +- .../services/dysmsapi/query_sms_template.go | 8 +- .../services/dysmsapi/send_batch_sms.go | 8 +- .../services/dysmsapi/send_sms.go | 8 +- .../services/dysmsapi/struct_data.go | 31 +++++ vendor/modules.txt | 2 +- 24 files changed, 516 insertions(+), 152 deletions(-) create mode 100644 vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_short_url.go create mode 100644 vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/create_short_param.go create mode 100644 vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_short_url.go create mode 100644 vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_short_url.go create mode 100644 vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/struct_data.go diff --git a/go.mod b/go.mod index 0f669573e..008b4a5b6 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/ajg/form v1.5.1 // indirect - github.com/aliyun/alibaba-cloud-sdk-go v1.61.518 + github.com/aliyun/alibaba-cloud-sdk-go v1.61.959 github.com/axetroy/go-fs v1.0.0 github.com/axetroy/mocker v1.2.0 github.com/denisbrodbeck/machineid v1.0.1 diff --git a/go.sum b/go.sum index eadb32b3e..94f92d75d 100644 --- a/go.sum +++ b/go.sum @@ -66,6 +66,8 @@ github.com/aliyun/alibaba-cloud-sdk-go v1.61.517 h1:cwdz5n9dGbITuG4DZTU1jgQwbsJL github.com/aliyun/alibaba-cloud-sdk-go v1.61.517/go.mod h1:pUKYbK5JQ+1Dfxk80P0qxGqe5dkxDoabbZS7zOcouyA= github.com/aliyun/alibaba-cloud-sdk-go v1.61.518 h1:tSqefLUla2xFan69COjTzw5IPA2VmkOGsP6mJ/FKMMg= github.com/aliyun/alibaba-cloud-sdk-go v1.61.518/go.mod h1:pUKYbK5JQ+1Dfxk80P0qxGqe5dkxDoabbZS7zOcouyA= +github.com/aliyun/alibaba-cloud-sdk-go v1.61.959 h1:MLf59YAwHF2GVTc5dLV8TRsWJZc7907OAOX5klE5DZY= +github.com/aliyun/alibaba-cloud-sdk-go v1.61.959/go.mod h1:pUKYbK5JQ+1Dfxk80P0qxGqe5dkxDoabbZS7zOcouyA= github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/axetroy/go-fs v1.0.0 h1:un0mpbpYjOQirgdlKlZlzTjF30DZwYwK+ObWMxubAXA= diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/client.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/client.go index 1b9832f7c..8d5cc73e2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/client.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/client.go @@ -26,7 +26,6 @@ import ( "runtime" "strconv" "strings" - "sync" "time" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth" @@ -75,11 +74,7 @@ type Client struct { EndpointType string Network string Domain string - - debug bool - isRunning bool - // void "panic(write to close channel)" cause of addAsync() after Shutdown() - asyncChanLock *sync.RWMutex + isOpenAsync bool } func (client *Client) Init() (err error) { @@ -152,8 +147,6 @@ func (client *Client) InitWithOptions(regionId string, config *Config, credentia } } - client.isRunning = true - client.asyncChanLock = new(sync.RWMutex) client.regionId = regionId client.config = config client.httpClient = &http.Client{} @@ -230,15 +223,20 @@ func (client *Client) getNoProxy(scheme string) []string { // EnableAsync enable the async task queue func (client *Client) EnableAsync(routinePoolSize, maxTaskQueueSize int) { + if client.isOpenAsync { + fmt.Println("warning: Please not call EnableAsync repeatedly") + return + } + client.isOpenAsync = true client.asyncTaskQueue = make(chan func(), maxTaskQueueSize) for i := 0; i < routinePoolSize; i++ { go func() { - for client.isRunning { - select { - case task, notClosed := <-client.asyncTaskQueue: - if notClosed { - task() - } + for { + task, notClosed := <-client.asyncTaskQueue + if !notClosed { + return + } else { + task() } } }() @@ -247,7 +245,7 @@ func (client *Client) EnableAsync(routinePoolSize, maxTaskQueueSize int) { func (client *Client) InitWithAccessKey(regionId, accessKeyId, accessKeySecret string) (err error) { config := client.InitClientConfig() - credential := &credentials.BaseCredential{ + credential := &credentials.AccessKeyCredential{ AccessKeyId: accessKeyId, AccessKeySecret: accessKeySecret, } @@ -422,7 +420,7 @@ func (client *Client) buildRequestWithSigner(request requests.AcsRequest, signer func getSendUserAgent(configUserAgent string, clientUserAgent, requestUserAgent map[string]string) string { realUserAgent := "" for key1, value1 := range clientUserAgent { - for key2, _ := range requestUserAgent { + for key2 := range requestUserAgent { if key1 == key2 { key1 = "" } @@ -448,7 +446,7 @@ func (client *Client) AppendUserAgent(key, value string) { client.userAgent = make(map[string]string) } if strings.ToLower(key) != "core" && strings.ToLower(key) != "go" { - for tag, _ := range client.userAgent { + for tag := range client.userAgent { if tag == key { client.userAgent[tag] = value newkey = false @@ -599,7 +597,7 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r startTime := time.Now() fieldMap["{start_time}"] = startTime.Format("2006-01-02 15:04:05") httpResponse, err = hookDo(client.httpClient.Do)(httpRequest) - fieldMap["{cost}"] = time.Now().Sub(startTime).String() + fieldMap["{cost}"] = time.Since(startTime).String() if err == nil { fieldMap["{code}"] = strconv.Itoa(httpResponse.StatusCode) fieldMap["{res_headers}"] = TransToString(httpResponse.Header) @@ -709,9 +707,7 @@ only block when any one of the following occurs: **/ func (client *Client) AddAsyncTask(task func()) (err error) { if client.asyncTaskQueue != nil { - client.asyncChanLock.RLock() - defer client.asyncChanLock.RUnlock() - if client.isRunning { + if client.isOpenAsync { client.asyncTaskQueue <- task } } else { @@ -816,13 +812,11 @@ func (client *Client) ProcessCommonRequestWithSigner(request *requests.CommonReq } func (client *Client) Shutdown() { - // lock the addAsync() - client.asyncChanLock.Lock() - defer client.asyncChanLock.Unlock() if client.asyncTaskQueue != nil { close(client.asyncTaskQueue) } - client.isRunning = false + + client.isOpenAsync = false } // Deprecated: Use NewClientWithRamRoleArn in this package instead. diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/config.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/config.go index 660989684..29b7cc35b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/config.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/config.go @@ -22,7 +22,7 @@ import ( ) type Config struct { - AutoRetry bool `default:"true"` + AutoRetry bool `default:"false"` MaxRetryTime int `default:"3"` UserAgent string `default:""` Debug bool `default:"false"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go index a4fc47098..8ee0ec53f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go @@ -1,4 +1,3 @@ - package endpoints import ( @@ -7,7 +6,7 @@ import ( "sync" ) -const endpointsJson =`{ +const endpointsJson = `{ "products": [ { "code": "emr", @@ -3617,10 +3616,6 @@ const endpointsJson =`{ "region": "ap-southeast-3", "endpoint": "metrics.ap-southeast-3.aliyuncs.com" }, - { - "region": "cn-hongkong", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, { "region": "ap-southeast-5", "endpoint": "metrics.ap-southeast-5.aliyuncs.com" @@ -3641,56 +3636,12 @@ const endpointsJson =`{ "region": "cn-huhehaote", "endpoint": "metrics.cn-huhehaote.aliyuncs.com" }, - { - "region": "cn-shanghai", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "us-west-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "us-east-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, { "region": "ap-northeast-1", "endpoint": "metrics.ap-northeast-1.aliyuncs.com" - }, - { - "region": "cn-qingdao", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "cn-zhangjiakou", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "me-east-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" } ], - "global_endpoint": "metrics.cn-hangzhou.aliyuncs.com", + "global_endpoint": "", "regional_endpoint_pattern": "" }, { @@ -4112,6 +4063,7 @@ const endpointsJson =`{ } ] }` + var initOnce sync.Once var data interface{} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/common_request.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/common_request.go index 6a341abb0..a27f82c00 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/common_request.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/common_request.go @@ -11,10 +11,11 @@ import ( type CommonRequest struct { *baseRequest - Version string - ApiName string - Product string - ServiceCode string + Version string + ApiName string + Product string + ServiceCode string + EndpointType string // roa params PathPattern string @@ -82,6 +83,7 @@ func (request *CommonRequest) TransToAcsRequest() { rpcRequest.product = request.Product rpcRequest.version = request.Version rpcRequest.locationServiceCode = request.ServiceCode + rpcRequest.locationEndpointType = request.EndpointType rpcRequest.actionName = request.ApiName rpcRequest.Headers["x-acs-version"] = request.Version rpcRequest.Headers["x-acs-action"] = request.ApiName diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/roa_request.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/roa_request.go index 60be355dd..4f52345b5 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/roa_request.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/roa_request.go @@ -138,7 +138,9 @@ func (request *RoaRequest) initWithCommonRequest(commonRequest *CommonRequest) { request.product = commonRequest.Product //request.version = commonRequest.Version request.Headers["x-acs-version"] = commonRequest.Version - request.Headers["x-acs-action"] = commonRequest.ApiName + if commonRequest.ApiName != "" { + request.Headers["x-acs-action"] = commonRequest.ApiName + } request.actionName = commonRequest.ApiName request.pathPattern = commonRequest.PathPattern request.locationServiceCode = commonRequest.ServiceCode diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_short_url.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_short_url.go new file mode 100644 index 000000000..21165ad30 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_short_url.go @@ -0,0 +1,108 @@ +package dysmsapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// AddShortUrl invokes the dysmsapi.AddShortUrl API synchronously +func (client *Client) AddShortUrl(request *AddShortUrlRequest) (response *AddShortUrlResponse, err error) { + response = CreateAddShortUrlResponse() + err = client.DoAction(request, response) + return +} + +// AddShortUrlWithChan invokes the dysmsapi.AddShortUrl API asynchronously +func (client *Client) AddShortUrlWithChan(request *AddShortUrlRequest) (<-chan *AddShortUrlResponse, <-chan error) { + responseChan := make(chan *AddShortUrlResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.AddShortUrl(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// AddShortUrlWithCallback invokes the dysmsapi.AddShortUrl API asynchronously +func (client *Client) AddShortUrlWithCallback(request *AddShortUrlRequest, callback func(response *AddShortUrlResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *AddShortUrlResponse + var err error + defer close(result) + response, err = client.AddShortUrl(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// AddShortUrlRequest is the request struct for api AddShortUrl +type AddShortUrlRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ShortUrlName string `position:"Body" name:"ShortUrlName"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + EffectiveDays string `position:"Body" name:"EffectiveDays"` + ProdCode string `position:"Body" name:"ProdCode"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SourceUrl string `position:"Body" name:"SourceUrl"` +} + +// AddShortUrlResponse is the response struct for api AddShortUrl +type AddShortUrlResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateAddShortUrlRequest creates a request to invoke AddShortUrl API +func CreateAddShortUrlRequest() (request *AddShortUrlRequest) { + request = &AddShortUrlRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "AddShortUrl", "", "") + request.Method = requests.POST + return +} + +// CreateAddShortUrlResponse creates a response to parse from AddShortUrl response +func CreateAddShortUrlResponse() (response *AddShortUrlResponse) { + response = &AddShortUrlResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_sms_sign.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_sms_sign.go index 6e9456c9e..8e23ccab3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_sms_sign.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_sms_sign.go @@ -21,7 +21,6 @@ import ( ) // AddSmsSign invokes the dysmsapi.AddSmsSign API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/addsmssign.html func (client *Client) AddSmsSign(request *AddSmsSignRequest) (response *AddSmsSignResponse, err error) { response = CreateAddSmsSignResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AddSmsSign(request *AddSmsSignRequest) (response *AddSmsSi } // AddSmsSignWithChan invokes the dysmsapi.AddSmsSign API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/addsmssign.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AddSmsSignWithChan(request *AddSmsSignRequest) (<-chan *AddSmsSignResponse, <-chan error) { responseChan := make(chan *AddSmsSignResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AddSmsSignWithChan(request *AddSmsSignRequest) (<-chan *Ad } // AddSmsSignWithCallback invokes the dysmsapi.AddSmsSign API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/addsmssign.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AddSmsSignWithCallback(request *AddSmsSignRequest, callback func(response *AddSmsSignResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -79,7 +74,7 @@ type AddSmsSignRequest struct { ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` Remark string `position:"Query" name:"Remark"` SignName string `position:"Query" name:"SignName"` - SignFileList *[]AddSmsSignSignFileList `position:"Query" name:"SignFileList" type:"Repeated"` + SignFileList *[]AddSmsSignSignFileList `position:"Body" name:"SignFileList" type:"Repeated"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` SignSource requests.Integer `position:"Query" name:"SignSource"` @@ -105,7 +100,8 @@ func CreateAddSmsSignRequest() (request *AddSmsSignRequest) { request = &AddSmsSignRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "AddSmsSign", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "AddSmsSign", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_sms_template.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_sms_template.go index bd4f804c0..129ac1ec6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_sms_template.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/add_sms_template.go @@ -21,7 +21,6 @@ import ( ) // AddSmsTemplate invokes the dysmsapi.AddSmsTemplate API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/addsmstemplate.html func (client *Client) AddSmsTemplate(request *AddSmsTemplateRequest) (response *AddSmsTemplateResponse, err error) { response = CreateAddSmsTemplateResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AddSmsTemplate(request *AddSmsTemplateRequest) (response * } // AddSmsTemplateWithChan invokes the dysmsapi.AddSmsTemplate API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/addsmstemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AddSmsTemplateWithChan(request *AddSmsTemplateRequest) (<-chan *AddSmsTemplateResponse, <-chan error) { responseChan := make(chan *AddSmsTemplateResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AddSmsTemplateWithChan(request *AddSmsTemplateRequest) (<- } // AddSmsTemplateWithCallback invokes the dysmsapi.AddSmsTemplate API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/addsmstemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AddSmsTemplateWithCallback(request *AddSmsTemplateRequest, callback func(response *AddSmsTemplateResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -99,7 +94,8 @@ func CreateAddSmsTemplateRequest() (request *AddSmsTemplateRequest) { request = &AddSmsTemplateRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "AddSmsTemplate", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "AddSmsTemplate", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/create_short_param.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/create_short_param.go new file mode 100644 index 000000000..f4a8b183c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/create_short_param.go @@ -0,0 +1,106 @@ +package dysmsapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateShortParam invokes the dysmsapi.CreateShortParam API synchronously +func (client *Client) CreateShortParam(request *CreateShortParamRequest) (response *CreateShortParamResponse, err error) { + response = CreateCreateShortParamResponse() + err = client.DoAction(request, response) + return +} + +// CreateShortParamWithChan invokes the dysmsapi.CreateShortParam API asynchronously +func (client *Client) CreateShortParamWithChan(request *CreateShortParamRequest) (<-chan *CreateShortParamResponse, <-chan error) { + responseChan := make(chan *CreateShortParamResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateShortParam(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateShortParamWithCallback invokes the dysmsapi.CreateShortParam API asynchronously +func (client *Client) CreateShortParamWithCallback(request *CreateShortParamRequest, callback func(response *CreateShortParamResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateShortParamResponse + var err error + defer close(result) + response, err = client.CreateShortParam(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateShortParamRequest is the request struct for api CreateShortParam +type CreateShortParamRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PhoneNumbers string `position:"Body" name:"PhoneNumbers"` + ProdCode string `position:"Body" name:"ProdCode"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// CreateShortParamResponse is the response struct for api CreateShortParam +type CreateShortParamResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateCreateShortParamRequest creates a request to invoke CreateShortParam API +func CreateCreateShortParamRequest() (request *CreateShortParamRequest) { + request = &CreateShortParamRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "CreateShortParam", "", "") + request.Method = requests.POST + return +} + +// CreateCreateShortParamResponse creates a response to parse from CreateShortParam response +func CreateCreateShortParamResponse() (response *CreateShortParamResponse) { + response = &CreateShortParamResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_short_url.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_short_url.go new file mode 100644 index 000000000..d3ef1bd5c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_short_url.go @@ -0,0 +1,105 @@ +package dysmsapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteShortUrl invokes the dysmsapi.DeleteShortUrl API synchronously +func (client *Client) DeleteShortUrl(request *DeleteShortUrlRequest) (response *DeleteShortUrlResponse, err error) { + response = CreateDeleteShortUrlResponse() + err = client.DoAction(request, response) + return +} + +// DeleteShortUrlWithChan invokes the dysmsapi.DeleteShortUrl API asynchronously +func (client *Client) DeleteShortUrlWithChan(request *DeleteShortUrlRequest) (<-chan *DeleteShortUrlResponse, <-chan error) { + responseChan := make(chan *DeleteShortUrlResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteShortUrl(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteShortUrlWithCallback invokes the dysmsapi.DeleteShortUrl API asynchronously +func (client *Client) DeleteShortUrlWithCallback(request *DeleteShortUrlRequest, callback func(response *DeleteShortUrlResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteShortUrlResponse + var err error + defer close(result) + response, err = client.DeleteShortUrl(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteShortUrlRequest is the request struct for api DeleteShortUrl +type DeleteShortUrlRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + ProdCode string `position:"Body" name:"ProdCode"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SourceUrl string `position:"Body" name:"SourceUrl"` +} + +// DeleteShortUrlResponse is the response struct for api DeleteShortUrl +type DeleteShortUrlResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` +} + +// CreateDeleteShortUrlRequest creates a request to invoke DeleteShortUrl API +func CreateDeleteShortUrlRequest() (request *DeleteShortUrlRequest) { + request = &DeleteShortUrlRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "DeleteShortUrl", "", "") + request.Method = requests.POST + return +} + +// CreateDeleteShortUrlResponse creates a response to parse from DeleteShortUrl response +func CreateDeleteShortUrlResponse() (response *DeleteShortUrlResponse) { + response = &DeleteShortUrlResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_sms_sign.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_sms_sign.go index e9f85a5c7..e5463864c 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_sms_sign.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_sms_sign.go @@ -21,7 +21,6 @@ import ( ) // DeleteSmsSign invokes the dysmsapi.DeleteSmsSign API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/deletesmssign.html func (client *Client) DeleteSmsSign(request *DeleteSmsSignRequest) (response *DeleteSmsSignResponse, err error) { response = CreateDeleteSmsSignResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteSmsSign(request *DeleteSmsSignRequest) (response *De } // DeleteSmsSignWithChan invokes the dysmsapi.DeleteSmsSign API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/deletesmssign.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteSmsSignWithChan(request *DeleteSmsSignRequest) (<-chan *DeleteSmsSignResponse, <-chan error) { responseChan := make(chan *DeleteSmsSignResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteSmsSignWithChan(request *DeleteSmsSignRequest) (<-ch } // DeleteSmsSignWithCallback invokes the dysmsapi.DeleteSmsSign API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/deletesmssign.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteSmsSignWithCallback(request *DeleteSmsSignRequest, callback func(response *DeleteSmsSignResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,7 +91,8 @@ func CreateDeleteSmsSignRequest() (request *DeleteSmsSignRequest) { request = &DeleteSmsSignRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "DeleteSmsSign", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "DeleteSmsSign", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_sms_template.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_sms_template.go index 85f29f334..ef3d71702 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_sms_template.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/delete_sms_template.go @@ -21,7 +21,6 @@ import ( ) // DeleteSmsTemplate invokes the dysmsapi.DeleteSmsTemplate API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/deletesmstemplate.html func (client *Client) DeleteSmsTemplate(request *DeleteSmsTemplateRequest) (response *DeleteSmsTemplateResponse, err error) { response = CreateDeleteSmsTemplateResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteSmsTemplate(request *DeleteSmsTemplateRequest) (resp } // DeleteSmsTemplateWithChan invokes the dysmsapi.DeleteSmsTemplate API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/deletesmstemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteSmsTemplateWithChan(request *DeleteSmsTemplateRequest) (<-chan *DeleteSmsTemplateResponse, <-chan error) { responseChan := make(chan *DeleteSmsTemplateResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteSmsTemplateWithChan(request *DeleteSmsTemplateReques } // DeleteSmsTemplateWithCallback invokes the dysmsapi.DeleteSmsTemplate API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/deletesmstemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteSmsTemplateWithCallback(request *DeleteSmsTemplateRequest, callback func(response *DeleteSmsTemplateResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,7 +91,8 @@ func CreateDeleteSmsTemplateRequest() (request *DeleteSmsTemplateRequest) { request = &DeleteSmsTemplateRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "DeleteSmsTemplate", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "DeleteSmsTemplate", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/modify_sms_sign.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/modify_sms_sign.go index 638057807..4c7dcf0ef 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/modify_sms_sign.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/modify_sms_sign.go @@ -21,7 +21,6 @@ import ( ) // ModifySmsSign invokes the dysmsapi.ModifySmsSign API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/modifysmssign.html func (client *Client) ModifySmsSign(request *ModifySmsSignRequest) (response *ModifySmsSignResponse, err error) { response = CreateModifySmsSignResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifySmsSign(request *ModifySmsSignRequest) (response *Mo } // ModifySmsSignWithChan invokes the dysmsapi.ModifySmsSign API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/modifysmssign.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySmsSignWithChan(request *ModifySmsSignRequest) (<-chan *ModifySmsSignResponse, <-chan error) { responseChan := make(chan *ModifySmsSignResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifySmsSignWithChan(request *ModifySmsSignRequest) (<-ch } // ModifySmsSignWithCallback invokes the dysmsapi.ModifySmsSign API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/modifysmssign.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySmsSignWithCallback(request *ModifySmsSignRequest, callback func(response *ModifySmsSignResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -79,7 +74,7 @@ type ModifySmsSignRequest struct { ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` Remark string `position:"Query" name:"Remark"` SignName string `position:"Query" name:"SignName"` - SignFileList *[]ModifySmsSignSignFileList `position:"Query" name:"SignFileList" type:"Repeated"` + SignFileList *[]ModifySmsSignSignFileList `position:"Body" name:"SignFileList" type:"Repeated"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` SignSource requests.Integer `position:"Query" name:"SignSource"` @@ -105,7 +100,8 @@ func CreateModifySmsSignRequest() (request *ModifySmsSignRequest) { request = &ModifySmsSignRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "ModifySmsSign", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "ModifySmsSign", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/modify_sms_template.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/modify_sms_template.go index fe76985a8..c7c77c18e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/modify_sms_template.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/modify_sms_template.go @@ -21,7 +21,6 @@ import ( ) // ModifySmsTemplate invokes the dysmsapi.ModifySmsTemplate API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/modifysmstemplate.html func (client *Client) ModifySmsTemplate(request *ModifySmsTemplateRequest) (response *ModifySmsTemplateResponse, err error) { response = CreateModifySmsTemplateResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifySmsTemplate(request *ModifySmsTemplateRequest) (resp } // ModifySmsTemplateWithChan invokes the dysmsapi.ModifySmsTemplate API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/modifysmstemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySmsTemplateWithChan(request *ModifySmsTemplateRequest) (<-chan *ModifySmsTemplateResponse, <-chan error) { responseChan := make(chan *ModifySmsTemplateResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifySmsTemplateWithChan(request *ModifySmsTemplateReques } // ModifySmsTemplateWithCallback invokes the dysmsapi.ModifySmsTemplate API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/modifysmstemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySmsTemplateWithCallback(request *ModifySmsTemplateRequest, callback func(response *ModifySmsTemplateResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -100,7 +95,8 @@ func CreateModifySmsTemplateRequest() (request *ModifySmsTemplateRequest) { request = &ModifySmsTemplateRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "ModifySmsTemplate", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "ModifySmsTemplate", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_send_details.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_send_details.go index 91942050c..1aa671f79 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_send_details.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_send_details.go @@ -21,7 +21,6 @@ import ( ) // QuerySendDetails invokes the dysmsapi.QuerySendDetails API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/querysenddetails.html func (client *Client) QuerySendDetails(request *QuerySendDetailsRequest) (response *QuerySendDetailsResponse, err error) { response = CreateQuerySendDetailsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) QuerySendDetails(request *QuerySendDetailsRequest) (respon } // QuerySendDetailsWithChan invokes the dysmsapi.QuerySendDetails API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/querysenddetails.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QuerySendDetailsWithChan(request *QuerySendDetailsRequest) (<-chan *QuerySendDetailsResponse, <-chan error) { responseChan := make(chan *QuerySendDetailsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) QuerySendDetailsWithChan(request *QuerySendDetailsRequest) } // QuerySendDetailsWithCallback invokes the dysmsapi.QuerySendDetails API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/querysenddetails.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QuerySendDetailsWithCallback(request *QuerySendDetailsRequest, callback func(response *QuerySendDetailsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -101,7 +96,8 @@ func CreateQuerySendDetailsRequest() (request *QuerySendDetailsRequest) { request = &QuerySendDetailsRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "QuerySendDetails", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "QuerySendDetails", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_short_url.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_short_url.go new file mode 100644 index 000000000..7eb830bcf --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_short_url.go @@ -0,0 +1,106 @@ +package dysmsapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// QueryShortUrl invokes the dysmsapi.QueryShortUrl API synchronously +func (client *Client) QueryShortUrl(request *QueryShortUrlRequest) (response *QueryShortUrlResponse, err error) { + response = CreateQueryShortUrlResponse() + err = client.DoAction(request, response) + return +} + +// QueryShortUrlWithChan invokes the dysmsapi.QueryShortUrl API asynchronously +func (client *Client) QueryShortUrlWithChan(request *QueryShortUrlRequest) (<-chan *QueryShortUrlResponse, <-chan error) { + responseChan := make(chan *QueryShortUrlResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryShortUrl(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryShortUrlWithCallback invokes the dysmsapi.QueryShortUrl API asynchronously +func (client *Client) QueryShortUrlWithCallback(request *QueryShortUrlRequest, callback func(response *QueryShortUrlResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryShortUrlResponse + var err error + defer close(result) + response, err = client.QueryShortUrl(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryShortUrlRequest is the request struct for api QueryShortUrl +type QueryShortUrlRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + ShortUrl string `position:"Body" name:"ShortUrl"` + ProdCode string `position:"Body" name:"ProdCode"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// QueryShortUrlResponse is the response struct for api QueryShortUrl +type QueryShortUrlResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateQueryShortUrlRequest creates a request to invoke QueryShortUrl API +func CreateQueryShortUrlRequest() (request *QueryShortUrlRequest) { + request = &QueryShortUrlRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "QueryShortUrl", "", "") + request.Method = requests.POST + return +} + +// CreateQueryShortUrlResponse creates a response to parse from QueryShortUrl response +func CreateQueryShortUrlResponse() (response *QueryShortUrlResponse) { + response = &QueryShortUrlResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_sms_sign.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_sms_sign.go index 507718771..9177e4ee8 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_sms_sign.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_sms_sign.go @@ -21,7 +21,6 @@ import ( ) // QuerySmsSign invokes the dysmsapi.QuerySmsSign API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/querysmssign.html func (client *Client) QuerySmsSign(request *QuerySmsSignRequest) (response *QuerySmsSignResponse, err error) { response = CreateQuerySmsSignResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) QuerySmsSign(request *QuerySmsSignRequest) (response *Quer } // QuerySmsSignWithChan invokes the dysmsapi.QuerySmsSign API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/querysmssign.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QuerySmsSignWithChan(request *QuerySmsSignRequest) (<-chan *QuerySmsSignResponse, <-chan error) { responseChan := make(chan *QuerySmsSignResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) QuerySmsSignWithChan(request *QuerySmsSignRequest) (<-chan } // QuerySmsSignWithCallback invokes the dysmsapi.QuerySmsSign API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/querysmssign.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QuerySmsSignWithCallback(request *QuerySmsSignRequest, callback func(response *QuerySmsSignResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -99,7 +94,8 @@ func CreateQuerySmsSignRequest() (request *QuerySmsSignRequest) { request = &QuerySmsSignRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "QuerySmsSign", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "QuerySmsSign", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_sms_template.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_sms_template.go index cdc0b8ffe..bd7e21553 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_sms_template.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/query_sms_template.go @@ -21,7 +21,6 @@ import ( ) // QuerySmsTemplate invokes the dysmsapi.QuerySmsTemplate API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/querysmstemplate.html func (client *Client) QuerySmsTemplate(request *QuerySmsTemplateRequest) (response *QuerySmsTemplateResponse, err error) { response = CreateQuerySmsTemplateResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) QuerySmsTemplate(request *QuerySmsTemplateRequest) (respon } // QuerySmsTemplateWithChan invokes the dysmsapi.QuerySmsTemplate API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/querysmstemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QuerySmsTemplateWithChan(request *QuerySmsTemplateRequest) (<-chan *QuerySmsTemplateResponse, <-chan error) { responseChan := make(chan *QuerySmsTemplateResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) QuerySmsTemplateWithChan(request *QuerySmsTemplateRequest) } // QuerySmsTemplateWithCallback invokes the dysmsapi.QuerySmsTemplate API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/querysmstemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) QuerySmsTemplateWithCallback(request *QuerySmsTemplateRequest, callback func(response *QuerySmsTemplateResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -102,7 +97,8 @@ func CreateQuerySmsTemplateRequest() (request *QuerySmsTemplateRequest) { request = &QuerySmsTemplateRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "QuerySmsTemplate", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "QuerySmsTemplate", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/send_batch_sms.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/send_batch_sms.go index d1db5d4a0..fd14cbc00 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/send_batch_sms.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/send_batch_sms.go @@ -21,7 +21,6 @@ import ( ) // SendBatchSms invokes the dysmsapi.SendBatchSms API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/sendbatchsms.html func (client *Client) SendBatchSms(request *SendBatchSmsRequest) (response *SendBatchSmsResponse, err error) { response = CreateSendBatchSmsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) SendBatchSms(request *SendBatchSmsRequest) (response *Send } // SendBatchSmsWithChan invokes the dysmsapi.SendBatchSms API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/sendbatchsms.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SendBatchSmsWithChan(request *SendBatchSmsRequest) (<-chan *SendBatchSmsResponse, <-chan error) { responseChan := make(chan *SendBatchSmsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) SendBatchSmsWithChan(request *SendBatchSmsRequest) (<-chan } // SendBatchSmsWithCallback invokes the dysmsapi.SendBatchSms API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/sendbatchsms.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SendBatchSmsWithCallback(request *SendBatchSmsRequest, callback func(response *SendBatchSmsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -100,7 +95,8 @@ func CreateSendBatchSmsRequest() (request *SendBatchSmsRequest) { request = &SendBatchSmsRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "SendBatchSms", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "SendBatchSms", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/send_sms.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/send_sms.go index 96bdbcd0c..11409918d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/send_sms.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/send_sms.go @@ -21,7 +21,6 @@ import ( ) // SendSms invokes the dysmsapi.SendSms API synchronously -// api document: https://help.aliyun.com/api/dysmsapi/sendsms.html func (client *Client) SendSms(request *SendSmsRequest) (response *SendSmsResponse, err error) { response = CreateSendSmsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) SendSms(request *SendSmsRequest) (response *SendSmsRespons } // SendSmsWithChan invokes the dysmsapi.SendSms API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/sendsms.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SendSmsWithChan(request *SendSmsRequest) (<-chan *SendSmsResponse, <-chan error) { responseChan := make(chan *SendSmsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) SendSmsWithChan(request *SendSmsRequest) (<-chan *SendSmsR } // SendSmsWithCallback invokes the dysmsapi.SendSms API asynchronously -// api document: https://help.aliyun.com/api/dysmsapi/sendsms.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) SendSmsWithCallback(request *SendSmsRequest, callback func(response *SendSmsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -101,7 +96,8 @@ func CreateSendSmsRequest() (request *SendSmsRequest) { request = &SendSmsRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Dysmsapi", "2017-05-25", "SendSms", "dysms", "openAPI") + request.InitWithApiInfo("Dysmsapi", "2017-05-25", "SendSms", "", "") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/struct_data.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/struct_data.go new file mode 100644 index 000000000..c9c223966 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi/struct_data.go @@ -0,0 +1,31 @@ +package dysmsapi + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Data is a nested struct in dysmsapi response +type Data struct { + CreateDate string `json:"CreateDate" xml:"CreateDate"` + PageViewCount string `json:"PageViewCount" xml:"PageViewCount"` + ShortUrlStatus string `json:"ShortUrlStatus" xml:"ShortUrlStatus"` + ShortUrl string `json:"ShortUrl" xml:"ShortUrl"` + UniqueVisitorCount string `json:"UniqueVisitorCount" xml:"UniqueVisitorCount"` + ExpireDate string `json:"ExpireDate" xml:"ExpireDate"` + ShortParam string `json:"ShortParam" xml:"ShortParam"` + ShortUrlName string `json:"ShortUrlName" xml:"ShortUrlName"` + ParamDetail string `json:"ParamDetail" xml:"ParamDetail"` + PhoneNumbers string `json:"PhoneNumbers" xml:"PhoneNumbers"` + SourceUrl string `json:"SourceUrl" xml:"SourceUrl"` +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 98b21becc..c535417ac 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -13,7 +13,7 @@ github.com/Shopify/goreferrer github.com/StackExchange/wmi # github.com/ajg/form v1.5.1 ## explicit -# github.com/aliyun/alibaba-cloud-sdk-go v1.61.518 +# github.com/aliyun/alibaba-cloud-sdk-go v1.61.959 ## explicit github.com/aliyun/alibaba-cloud-sdk-go/sdk github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth