v20190722

package
v3.0.887+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Internal error.
	INTERNALERROR = "InternalError"

	// Missing parameter.
	MISSINGPARAMETER = "MissingParameter"

	// Authentication failed.
	UNAUTHORIZEDOPERATION_ERRAUTH = "UnauthorizedOperation.ErrAuth"

	// Operation not authorized/No valid package/The account is overdue
	UNAUTHORIZEDOPERATION_UNAUTHORIZED = "UnauthorizedOperation.Unauthorized"
)
View Source
const APIVersion = "2019-07-22"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) DescribeCaptchaResult

func (c *Client) DescribeCaptchaResult(request *DescribeCaptchaResultRequest) (response *DescribeCaptchaResultResponse, err error)

DescribeCaptchaResult This API is used to query the result of CAPTCHA ticket verification (web and app).

error code that may be returned:

INTERNALERROR = "InternalError"
MISSINGPARAMETER = "MissingParameter"
UNAUTHORIZEDOPERATION_ERRAUTH = "UnauthorizedOperation.ErrAuth"
UNAUTHORIZEDOPERATION_UNAUTHORIZED = "UnauthorizedOperation.Unauthorized"

func (*Client) DescribeCaptchaResultWithContext

func (c *Client) DescribeCaptchaResultWithContext(ctx context.Context, request *DescribeCaptchaResultRequest) (response *DescribeCaptchaResultResponse, err error)

DescribeCaptchaResult This API is used to query the result of CAPTCHA ticket verification (web and app).

error code that may be returned:

INTERNALERROR = "InternalError"
MISSINGPARAMETER = "MissingParameter"
UNAUTHORIZEDOPERATION_ERRAUTH = "UnauthorizedOperation.ErrAuth"
UNAUTHORIZEDOPERATION_UNAUTHORIZED = "UnauthorizedOperation.Unauthorized"

type DescribeCaptchaResultRequest

type DescribeCaptchaResultRequest struct {
	*tchttp.BaseRequest

	// It must be `9` here. You can configure the CAPTCHA types in the console.
	CaptchaType *uint64 `json:"CaptchaType,omitnil" name:"CaptchaType"`

	// The user verification ticket returned by the frontend callback function
	Ticket *string `json:"Ticket,omitnil" name:"Ticket"`

	// The user public IP obtained from the customer backend server
	UserIp *string `json:"UserIp,omitnil" name:"UserIp"`

	// A random string returned by the frontend callback function
	Randstr *string `json:"Randstr,omitnil" name:"Randstr"`

	// CAPTCHA's app ID. Log in to the [Captcha console](https://console.cloud.tencent.com/captcha/graphical) and you can view the CaptchaAppId in the "Key" column of the CAPTCHA list.
	CaptchaAppId *uint64 `json:"CaptchaAppId,omitnil" name:"CaptchaAppId"`

	// CAPTCHA's app key. Log in to the [Captcha console](https://console.cloud.tencent.com/captcha/graphical) and you can view the AppSecretKey in the "Key" column of the CAPTCHA list. AppSecretKey is the key for CAPTCHA ticket verification performed by the server. Please keep it confidential and do not disclose it to any third parties.
	AppSecretKey *string `json:"AppSecretKey,omitnil" name:"AppSecretKey"`

	// Reserved field.
	BusinessId *uint64 `json:"BusinessId,omitnil" name:"BusinessId"`

	// Reserved field.
	SceneId *uint64 `json:"SceneId,omitnil" name:"SceneId"`

	// MAC address or unique identifier of a device
	MacAddress *string `json:"MacAddress,omitnil" name:"MacAddress"`

	// Mobile equipment identity number
	Imei *string `json:"Imei,omitnil" name:"Imei"`

	// Indicates whether to return the time when the frontend obtains the CAPTCHA. Valid values: 1 (return the time) and others.
	NeedGetCaptchaTime *int64 `json:"NeedGetCaptchaTime,omitnil" name:"NeedGetCaptchaTime"`
}

func NewDescribeCaptchaResultRequest

func NewDescribeCaptchaResultRequest() (request *DescribeCaptchaResultRequest)

func (*DescribeCaptchaResultRequest) FromJsonString

func (r *DescribeCaptchaResultRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeCaptchaResultRequest) ToJsonString

func (r *DescribeCaptchaResultRequest) ToJsonString() string

type DescribeCaptchaResultRequestParams

type DescribeCaptchaResultRequestParams struct {
	// It must be `9` here. You can configure the CAPTCHA types in the console.
	CaptchaType *uint64 `json:"CaptchaType,omitnil" name:"CaptchaType"`

	// The user verification ticket returned by the frontend callback function
	Ticket *string `json:"Ticket,omitnil" name:"Ticket"`

	// The user public IP obtained from the customer backend server
	UserIp *string `json:"UserIp,omitnil" name:"UserIp"`

	// A random string returned by the frontend callback function
	Randstr *string `json:"Randstr,omitnil" name:"Randstr"`

	// CAPTCHA's app ID. Log in to the [Captcha console](https://console.cloud.tencent.com/captcha/graphical) and you can view the CaptchaAppId in the "Key" column of the CAPTCHA list.
	CaptchaAppId *uint64 `json:"CaptchaAppId,omitnil" name:"CaptchaAppId"`

	// CAPTCHA's app key. Log in to the [Captcha console](https://console.cloud.tencent.com/captcha/graphical) and you can view the AppSecretKey in the "Key" column of the CAPTCHA list. AppSecretKey is the key for CAPTCHA ticket verification performed by the server. Please keep it confidential and do not disclose it to any third parties.
	AppSecretKey *string `json:"AppSecretKey,omitnil" name:"AppSecretKey"`

	// Reserved field.
	BusinessId *uint64 `json:"BusinessId,omitnil" name:"BusinessId"`

	// Reserved field.
	SceneId *uint64 `json:"SceneId,omitnil" name:"SceneId"`

	// MAC address or unique identifier of a device
	MacAddress *string `json:"MacAddress,omitnil" name:"MacAddress"`

	// Mobile equipment identity number
	Imei *string `json:"Imei,omitnil" name:"Imei"`

	// Indicates whether to return the time when the frontend obtains the CAPTCHA. Valid values: 1 (return the time) and others.
	NeedGetCaptchaTime *int64 `json:"NeedGetCaptchaTime,omitnil" name:"NeedGetCaptchaTime"`
}

Predefined struct for user

type DescribeCaptchaResultResponse

type DescribeCaptchaResultResponse struct {
	*tchttp.BaseResponse
	Response *DescribeCaptchaResultResponseParams `json:"Response"`
}

func NewDescribeCaptchaResultResponse

func NewDescribeCaptchaResultResponse() (response *DescribeCaptchaResultResponse)

func (*DescribeCaptchaResultResponse) FromJsonString

func (r *DescribeCaptchaResultResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeCaptchaResultResponse) ToJsonString

func (r *DescribeCaptchaResultResponse) ToJsonString() string

type DescribeCaptchaResultResponseParams

type DescribeCaptchaResultResponseParams struct {
	// `1 OK`: Verification passed
	// `7 captcha no match`: The passed in `Randstr` is invalid. Make sure it is the same as the `Randstr` returned from the frontend.
	// `8 ticket expired`: The `Ticket` has expired. A ticket is valid for five minutes. Please generate a new `Ticket` and `Randstr`.
	// `9 ticket reused`: The specified `Ticket` has been used. Please generate a new `Ticket` and `Randstr`.
	// `15 decrypt fail`: The specified `Ticket` is invalid. Make sure it’s the same as the Ticket returned from the frontend.
	// `16 appid-ticket mismatch`: The specified `CaptchaAppId` is invalid. Make sure it’s the same as the `CaptchaAppId` returned from the frontend. You can obtain it from the CAPTCHA console in **Verification management** > **Basic configuration**.
	// `21 diff`. Ticket verification error. Possible reasons: 1) If the ticket contains the `terror` prefix, it’s usually the case that a disaster recovery ticket is generated due to the network connection problems of the user. You can choose to ignore it or verify again. 2) If the ticket does not include the `terror` prefix, Captcha detects security risk on this request . You can choose to block it or not.
	// `100 appid-secretkey-ticket mismatch`: Parameter error. 1) Make sure `CaptchaAppId` and `AppSecretKey` are correct. `CaptchaAppId` and `AppSecretKey` in the CAPTACHA console under **Verification management** > **Basic configuration**. 2) Make sure the passed-in `Ticket` is generated by using the passed-in `CaptchaAppId`.
	CaptchaCode *int64 `json:"CaptchaCode,omitnil" name:"CaptchaCode"`

	// Status description and verification error message
	// Note: This field may return `null`, indicating that no valid value was found.
	CaptchaMsg *string `json:"CaptchaMsg,omitnil" name:"CaptchaMsg"`

	// This parameter returns the result of imperceptible verification. This parameter is not available for Tencent Cloud International yet.
	// `0`: The request is trusted.
	// `100`: The request is malicious.
	// Note: This field may return `null`, indicating that no valid value was found.
	EvilLevel *int64 `json:"EvilLevel,omitnil" name:"EvilLevel"`

	// The timestamp when the frontend obtains the CAPTCHA.
	// Note: This field may return `null`, indicating that no valid value was found.
	GetCaptchaTime *int64 `json:"GetCaptchaTime,omitnil" name:"GetCaptchaTime"`

	// Blocking type
	// Note: This field may return null, indicating that no valid values can be obtained.
	EvilBitmap *int64 `json:"EvilBitmap,omitnil" name:"EvilBitmap"`

	// The time when the CAPTCHA is submitted.
	SubmitCaptchaTime *int64 `json:"SubmitCaptchaTime,omitnil" name:"SubmitCaptchaTime"`

	// The unique request ID, which is returned for each request. RequestId is required for locating a problem.
	RequestId *string `json:"RequestId,omitnil" name:"RequestId"`
}

Predefined struct for user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL