Jelajahi Sumber

由云金发起的CLOUDAUTH SDK自动发布, 版本号:1.12.3

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 7 tahun lalu
induk
melakukan
750c1d1135

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2018-05-17 Version: 1.12.3
+1, Supporting ethnicGroup and idCardStartDate fields in GetMaterials api
+
 2018-05-17 Version: 1.12.2
 1, the first version of private dns SDK
 

+ 81 - 0
services/cloudauth/client.go

@@ -0,0 +1,81 @@
+package cloudauth
+
+//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"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
+)
+
+// Client is the sdk client struct, each func corresponds to an OpenAPI
+type Client struct {
+	sdk.Client
+}
+
+// NewClient creates a sdk client with environment variables
+func NewClient() (client *Client, err error) {
+	client = &Client{}
+	err = client.Init()
+	return
+}
+
+// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
+// this is the common api to create a sdk client
+func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithOptions(regionId, config, credential)
+	return
+}
+
+// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
+// usage: https://help.aliyun.com/document_detail/66217.html
+func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	return
+}
+
+// NewClientWithStsToken is a shortcut to create sdk client with sts token
+// usage: https://help.aliyun.com/document_detail/66222.html
+func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	return
+}
+
+// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
+// usage: https://help.aliyun.com/document_detail/66222.html
+func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	return
+}
+
+// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
+// usage: https://help.aliyun.com/document_detail/66223.html
+func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithEcsRamRole(regionId, roleName)
+	return
+}
+
+// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
+// attention: rsa key pair auth is only Japan regions available
+func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
+	client = &Client{}
+	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	return
+}

+ 112 - 0
services/cloudauth/compare_faces.go

@@ -0,0 +1,112 @@
+package cloudauth
+
+//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"
+)
+
+// CompareFaces invokes the cloudauth.CompareFaces API synchronously
+// api document: https://help.aliyun.com/api/cloudauth/comparefaces.html
+func (client *Client) CompareFaces(request *CompareFacesRequest) (response *CompareFacesResponse, err error) {
+	response = CreateCompareFacesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CompareFacesWithChan invokes the cloudauth.CompareFaces API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/comparefaces.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CompareFacesWithChan(request *CompareFacesRequest) (<-chan *CompareFacesResponse, <-chan error) {
+	responseChan := make(chan *CompareFacesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CompareFaces(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CompareFacesWithCallback invokes the cloudauth.CompareFaces API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/comparefaces.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CompareFacesWithCallback(request *CompareFacesRequest, callback func(response *CompareFacesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CompareFacesResponse
+		var err error
+		defer close(result)
+		response, err = client.CompareFaces(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CompareFacesRequest is the request struct for api CompareFaces
+type CompareFacesRequest struct {
+	*requests.RpcRequest
+	SourceIp         string           `position:"Query" name:"SourceIp"`
+	ResourceOwnerId  requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	TargetImageType  string           `position:"Query" name:"TargetImageType"`
+	SourceImageType  string           `position:"Query" name:"SourceImageType"`
+	SourceImageValue string           `position:"Query" name:"SourceImageValue"`
+	TargetImageValue string           `position:"Query" name:"TargetImageValue"`
+}
+
+// CompareFacesResponse is the response struct for api CompareFaces
+type CompareFacesResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateCompareFacesRequest creates a request to invoke CompareFaces API
+func CreateCompareFacesRequest() (request *CompareFacesRequest) {
+	request = &CompareFacesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cloudauth", "2018-05-04", "CompareFaces", "cloudauth", "openAPI")
+	return
+}
+
+// CreateCompareFacesResponse creates a response to parse from CompareFaces response
+func CreateCompareFacesResponse() (response *CompareFacesResponse) {
+	response = &CompareFacesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/cloudauth/get_materials.go

@@ -0,0 +1,110 @@
+package cloudauth
+
+//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"
+)
+
+// GetMaterials invokes the cloudauth.GetMaterials API synchronously
+// api document: https://help.aliyun.com/api/cloudauth/getmaterials.html
+func (client *Client) GetMaterials(request *GetMaterialsRequest) (response *GetMaterialsResponse, err error) {
+	response = CreateGetMaterialsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetMaterialsWithChan invokes the cloudauth.GetMaterials API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/getmaterials.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetMaterialsWithChan(request *GetMaterialsRequest) (<-chan *GetMaterialsResponse, <-chan error) {
+	responseChan := make(chan *GetMaterialsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetMaterials(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetMaterialsWithCallback invokes the cloudauth.GetMaterials API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/getmaterials.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetMaterialsWithCallback(request *GetMaterialsRequest, callback func(response *GetMaterialsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetMaterialsResponse
+		var err error
+		defer close(result)
+		response, err = client.GetMaterials(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetMaterialsRequest is the request struct for api GetMaterials
+type GetMaterialsRequest struct {
+	*requests.RpcRequest
+	SourceIp        string           `position:"Query" name:"SourceIp"`
+	ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	Biz             string           `position:"Query" name:"Biz"`
+	TicketId        string           `position:"Query" name:"TicketId"`
+}
+
+// GetMaterialsResponse is the response struct for api GetMaterials
+type GetMaterialsResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateGetMaterialsRequest creates a request to invoke GetMaterials API
+func CreateGetMaterialsRequest() (request *GetMaterialsRequest) {
+	request = &GetMaterialsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cloudauth", "2018-05-04", "GetMaterials", "cloudauth", "openAPI")
+	return
+}
+
+// CreateGetMaterialsResponse creates a response to parse from GetMaterials response
+func CreateGetMaterialsResponse() (response *GetMaterialsResponse) {
+	response = &GetMaterialsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/cloudauth/get_status.go

@@ -0,0 +1,110 @@
+package cloudauth
+
+//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"
+)
+
+// GetStatus invokes the cloudauth.GetStatus API synchronously
+// api document: https://help.aliyun.com/api/cloudauth/getstatus.html
+func (client *Client) GetStatus(request *GetStatusRequest) (response *GetStatusResponse, err error) {
+	response = CreateGetStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetStatusWithChan invokes the cloudauth.GetStatus API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/getstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetStatusWithChan(request *GetStatusRequest) (<-chan *GetStatusResponse, <-chan error) {
+	responseChan := make(chan *GetStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetStatusWithCallback invokes the cloudauth.GetStatus API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/getstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetStatusWithCallback(request *GetStatusRequest, callback func(response *GetStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.GetStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetStatusRequest is the request struct for api GetStatus
+type GetStatusRequest struct {
+	*requests.RpcRequest
+	SourceIp        string           `position:"Query" name:"SourceIp"`
+	ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	Biz             string           `position:"Query" name:"Biz"`
+	TicketId        string           `position:"Query" name:"TicketId"`
+}
+
+// GetStatusResponse is the response struct for api GetStatus
+type GetStatusResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateGetStatusRequest creates a request to invoke GetStatus API
+func CreateGetStatusRequest() (request *GetStatusRequest) {
+	request = &GetStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cloudauth", "2018-05-04", "GetStatus", "cloudauth", "openAPI")
+	return
+}
+
+// CreateGetStatusResponse creates a response to parse from GetStatus response
+func CreateGetStatusResponse() (response *GetStatusResponse) {
+	response = &GetStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 112 - 0
services/cloudauth/get_verify_token.go

@@ -0,0 +1,112 @@
+package cloudauth
+
+//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"
+)
+
+// GetVerifyToken invokes the cloudauth.GetVerifyToken API synchronously
+// api document: https://help.aliyun.com/api/cloudauth/getverifytoken.html
+func (client *Client) GetVerifyToken(request *GetVerifyTokenRequest) (response *GetVerifyTokenResponse, err error) {
+	response = CreateGetVerifyTokenResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetVerifyTokenWithChan invokes the cloudauth.GetVerifyToken API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/getverifytoken.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetVerifyTokenWithChan(request *GetVerifyTokenRequest) (<-chan *GetVerifyTokenResponse, <-chan error) {
+	responseChan := make(chan *GetVerifyTokenResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetVerifyToken(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetVerifyTokenWithCallback invokes the cloudauth.GetVerifyToken API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/getverifytoken.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetVerifyTokenWithCallback(request *GetVerifyTokenRequest, callback func(response *GetVerifyTokenResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetVerifyTokenResponse
+		var err error
+		defer close(result)
+		response, err = client.GetVerifyToken(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetVerifyTokenRequest is the request struct for api GetVerifyToken
+type GetVerifyTokenRequest struct {
+	*requests.RpcRequest
+	SourceIp        string           `position:"Query" name:"SourceIp"`
+	ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	Biz             string           `position:"Query" name:"Biz"`
+	TicketId        string           `position:"Query" name:"TicketId"`
+	Binding         string           `position:"Query" name:"Binding"`
+	UserData        string           `position:"Query" name:"UserData"`
+}
+
+// GetVerifyTokenResponse is the response struct for api GetVerifyToken
+type GetVerifyTokenResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateGetVerifyTokenRequest creates a request to invoke GetVerifyToken API
+func CreateGetVerifyTokenRequest() (request *GetVerifyTokenRequest) {
+	request = &GetVerifyTokenRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cloudauth", "2018-05-04", "GetVerifyToken", "cloudauth", "openAPI")
+	return
+}
+
+// CreateGetVerifyTokenResponse creates a response to parse from GetVerifyToken response
+func CreateGetVerifyTokenResponse() (response *GetVerifyTokenResponse) {
+	response = &GetVerifyTokenResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 39 - 0
services/cloudauth/struct_data.go

@@ -0,0 +1,39 @@
+package cloudauth
+
+//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 cloudauth response
+type Data struct {
+	Name                 string       `json:"Name" xml:"Name"`
+	IdCardFrontPic       string       `json:"IdCardFrontPic" xml:"IdCardFrontPic"`
+	TrustedScore         float64      `json:"TrustedScore" xml:"TrustedScore"`
+	FacePic              string       `json:"FacePic" xml:"FacePic"`
+	IdCardExpiry         string       `json:"IdCardExpiry" xml:"IdCardExpiry"`
+	AuditConclusions     string       `json:"AuditConclusions" xml:"AuditConclusions"`
+	IdCardStartDate      string       `json:"IdCardStartDate" xml:"IdCardStartDate"`
+	IdCardType           string       `json:"IdCardType" xml:"IdCardType"`
+	SimilarityScore      float64      `json:"SimilarityScore" xml:"SimilarityScore"`
+	IdentificationNumber string       `json:"IdentificationNumber" xml:"IdentificationNumber"`
+	Address              string       `json:"Address" xml:"Address"`
+	EthnicGroup          string       `json:"EthnicGroup" xml:"EthnicGroup"`
+	Sex                  string       `json:"Sex" xml:"Sex"`
+	IdCardBackPic        string       `json:"IdCardBackPic" xml:"IdCardBackPic"`
+	StatusCode           int          `json:"StatusCode" xml:"StatusCode"`
+	ConfidenceThresholds string       `json:"ConfidenceThresholds" xml:"ConfidenceThresholds"`
+	StsToken             StsToken     `json:"StsToken" xml:"StsToken"`
+	VerifyToken          VerifyToken  `json:"VerifyToken" xml:"VerifyToken"`
+	VerifyStatus         VerifyStatus `json:"VerifyStatus" xml:"VerifyStatus"`
+}

+ 27 - 0
services/cloudauth/struct_sts_token.go

@@ -0,0 +1,27 @@
+package cloudauth
+
+//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.
+
+// StsToken is a nested struct in cloudauth response
+type StsToken struct {
+	AccessKeyId     string `json:"AccessKeyId" xml:"AccessKeyId"`
+	AccessKeySecret string `json:"AccessKeySecret" xml:"AccessKeySecret"`
+	Expiration      string `json:"Expiration" xml:"Expiration"`
+	EndPoint        string `json:"EndPoint" xml:"EndPoint"`
+	BucketName      string `json:"BucketName" xml:"BucketName"`
+	Path            string `json:"Path" xml:"Path"`
+	Token           string `json:"Token" xml:"Token"`
+}

+ 23 - 0
services/cloudauth/struct_verify_status.go

@@ -0,0 +1,23 @@
+package cloudauth
+
+//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.
+
+// VerifyStatus is a nested struct in cloudauth response
+type VerifyStatus struct {
+	StatusCode      int     `json:"StatusCode" xml:"StatusCode"`
+	TrustedScore    float64 `json:"TrustedScore" xml:"TrustedScore"`
+	SimilarityScore float64 `json:"SimilarityScore" xml:"SimilarityScore"`
+}

+ 22 - 0
services/cloudauth/struct_verify_token.go

@@ -0,0 +1,22 @@
+package cloudauth
+
+//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.
+
+// VerifyToken is a nested struct in cloudauth response
+type VerifyToken struct {
+	Token           string `json:"Token" xml:"Token"`
+	DurationSeconds int    `json:"DurationSeconds" xml:"DurationSeconds"`
+}

+ 116 - 0
services/cloudauth/submit_materials.go

@@ -0,0 +1,116 @@
+package cloudauth
+
+//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"
+)
+
+// SubmitMaterials invokes the cloudauth.SubmitMaterials API synchronously
+// api document: https://help.aliyun.com/api/cloudauth/submitmaterials.html
+func (client *Client) SubmitMaterials(request *SubmitMaterialsRequest) (response *SubmitMaterialsResponse, err error) {
+	response = CreateSubmitMaterialsResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SubmitMaterialsWithChan invokes the cloudauth.SubmitMaterials API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/submitmaterials.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SubmitMaterialsWithChan(request *SubmitMaterialsRequest) (<-chan *SubmitMaterialsResponse, <-chan error) {
+	responseChan := make(chan *SubmitMaterialsResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SubmitMaterials(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SubmitMaterialsWithCallback invokes the cloudauth.SubmitMaterials API asynchronously
+// api document: https://help.aliyun.com/api/cloudauth/submitmaterials.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SubmitMaterialsWithCallback(request *SubmitMaterialsRequest, callback func(response *SubmitMaterialsResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SubmitMaterialsResponse
+		var err error
+		defer close(result)
+		response, err = client.SubmitMaterials(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SubmitMaterialsRequest is the request struct for api SubmitMaterials
+type SubmitMaterialsRequest struct {
+	*requests.RpcRequest
+	SourceIp        string                     `position:"Query" name:"SourceIp"`
+	ResourceOwnerId requests.Integer           `position:"Query" name:"ResourceOwnerId"`
+	VerifyToken     string                     `position:"Query" name:"VerifyToken"`
+	Material        *[]SubmitMaterialsMaterial `position:"Query" name:"Material"  type:"Repeated"`
+}
+
+// SubmitMaterialsMaterial is a repeated param struct in SubmitMaterialsRequest
+type SubmitMaterialsMaterial struct {
+	MaterialType string `name:"MaterialType"`
+	Value        string `name:"Value"`
+}
+
+// SubmitMaterialsResponse is the response struct for api SubmitMaterials
+type SubmitMaterialsResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Success   bool   `json:"Success" xml:"Success"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Data      Data   `json:"Data" xml:"Data"`
+}
+
+// CreateSubmitMaterialsRequest creates a request to invoke SubmitMaterials API
+func CreateSubmitMaterialsRequest() (request *SubmitMaterialsRequest) {
+	request = &SubmitMaterialsRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Cloudauth", "2018-05-04", "SubmitMaterials", "cloudauth", "openAPI")
+	return
+}
+
+// CreateSubmitMaterialsResponse creates a response to parse from SubmitMaterials response
+func CreateSubmitMaterialsResponse() (response *SubmitMaterialsResponse) {
+	response = &SubmitMaterialsResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}