Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) DetectReflectLivenessAndCompare(request *DetectReflectLivenessAndCompareRequest) (response *DetectReflectLivenessAndCompareResponse, err error)
- func (c *Client) DetectReflectLivenessAndCompareWithContext(ctx context.Context, request *DetectReflectLivenessAndCompareRequest) (response *DetectReflectLivenessAndCompareResponse, err error)
- func (c *Client) LivenessCompare(request *LivenessCompareRequest) (response *LivenessCompareResponse, err error)
- func (c *Client) LivenessCompareWithContext(ctx context.Context, request *LivenessCompareRequest) (response *LivenessCompareResponse, err error)
- type DetectReflectLivenessAndCompareRequest
- type DetectReflectLivenessAndCompareResponse
- type LivenessCompareRequest
- type LivenessCompareResponse
Constants ¶
const ( // No motions of eye closing are detected. FAILEDOPERATION_ACTIONCLOSEEYE = "FailedOperation.ActionCloseEye" // The face is too close to the screen. FAILEDOPERATION_ACTIONFACECLOSE = "FailedOperation.ActionFaceClose" // The face is too far from the screen. FAILEDOPERATION_ACTIONFACEFAR = "FailedOperation.ActionFaceFar" // The face is too far left from the screen. FAILEDOPERATION_ACTIONFACELEFT = "FailedOperation.ActionFaceLeft" // The face is too far right from the screen. FAILEDOPERATION_ACTIONFACERIGHT = "FailedOperation.ActionFaceRight" // The first motion is not detected. FAILEDOPERATION_ACTIONFIRSTACTION = "FailedOperation.ActionFirstAction" // The lighting is too dim. FAILEDOPERATION_ACTIONLIGHTDARK = "FailedOperation.ActionLightDark" // The lighting is too strong. FAILEDOPERATION_ACTIONLIGHTSTRONG = "FailedOperation.ActionLightStrong" // Failed to detect a full face. FAILEDOPERATION_ACTIONNODETECTFACE = "FailedOperation.ActionNodetectFace" // No motions of mouth opening are detected. FAILEDOPERATION_ACTIONOPENMOUTH = "FailedOperation.ActionOpenMouth" // Comparison failed. FAILEDOPERATION_COMPAREFAIL = "FailedOperation.CompareFail" // The comparison similarity did not reach the passing standard. FAILEDOPERATION_COMPARELOWSIMILARITY = "FailedOperation.CompareLowSimilarity" // Error calling the comparison engine API. FAILEDOPERATION_COMPARESYSTEMERROR = "FailedOperation.CompareSystemError" // File download failed. FAILEDOPERATION_DOWNLOADERROR = "FailedOperation.DownLoadError" // File download timed out. FAILEDOPERATION_DOWNLOADTIMEOUTERROR = "FailedOperation.DownLoadTimeoutError" // The image is blurry. FAILEDOPERATION_IMAGEBLUR = "FailedOperation.ImageBlur" // Image decoding failed. FAILEDOPERATION_IMAGEDECODEFAILED = "FailedOperation.ImageDecodeFailed" // The image is too large. FAILEDOPERATION_IMAGESIZETOOLARGE = "FailedOperation.ImageSizeTooLarge" // Multiple faces are detected. FAILEDOPERATION_LIFEPHOTODETECTFACES = "FailedOperation.LifePhotoDetectFaces" // Real person comparison failed. FAILEDOPERATION_LIFEPHOTODETECTFAKE = "FailedOperation.LifePhotoDetectFake" // Failed to detect a full face. FAILEDOPERATION_LIFEPHOTODETECTNOFACES = "FailedOperation.LifePhotoDetectNoFaces" // The resolution of the image passed in is too low. Please upload a new one. FAILEDOPERATION_LIFEPHOTOPOORQUALITY = "FailedOperation.LifePhotoPoorQuality" // The image passed in is too large or too small. FAILEDOPERATION_LIFEPHOTOSIZEERROR = "FailedOperation.LifePhotoSizeError" // The face is not fully exposed. FAILEDOPERATION_LIPFACEINCOMPLETE = "FailedOperation.LipFaceIncomplete" // The lip movement range is too small. FAILEDOPERATION_LIPMOVESMALL = "FailedOperation.LipMoveSmall" // Failed to pull the video. Please try again. FAILEDOPERATION_LIPNETFAILED = "FailedOperation.LipNetFailed" // The video is empty or its size is inappropriate. The recording duration should be about 6 seconds. FAILEDOPERATION_LIPSIZEERROR = "FailedOperation.LipSizeError" // The video format is incorrect. FAILEDOPERATION_LIPVIDEOINVALID = "FailedOperation.LipVideoInvalid" // The video definition is too low. FAILEDOPERATION_LIPVIDEOQUAILITY = "FailedOperation.LipVideoQuaility" // No sound is detected. FAILEDOPERATION_LIPVOICEDETECT = "FailedOperation.LipVoiceDetect" // The volume of the video is too low. FAILEDOPERATION_LIPVOICELOW = "FailedOperation.LipVoiceLow" // Speech recognition failed. FAILEDOPERATION_LIPVOICERECOGNIZE = "FailedOperation.LipVoiceRecognize" // Face detection failed. Unable to extract the photo for comparison. FAILEDOPERATION_LIVESSBESTFRAMEERROR = "FailedOperation.LivessBestFrameError" // Liveness detection failed. FAILEDOPERATION_LIVESSDETECTFAIL = "FailedOperation.LivessDetectFail" // Suspected spoofed recording. FAILEDOPERATION_LIVESSDETECTFAKE = "FailedOperation.LivessDetectFake" // Error calling the liveness engine API. FAILEDOPERATION_LIVESSSYSTEMERROR = "FailedOperation.LivessSystemError" // Video-based real person detection failed. FAILEDOPERATION_LIVESSUNKNOWNERROR = "FailedOperation.LivessUnknownError" // Real person detection failed. FAILEDOPERATION_SILENTDETECTFAIL = "FailedOperation.SilentDetectFail" // Eye detection failed. FAILEDOPERATION_SILENTEYELIVEFAIL = "FailedOperation.SilentEyeLiveFail" // No face is detected in the video. FAILEDOPERATION_SILENTFACEDETECTFAIL = "FailedOperation.SilentFaceDetectFail" // Low face quality. FAILEDOPERATION_SILENTFACEQUALITYFAIL = "FailedOperation.SilentFaceQualityFail" // A face mask is detected. FAILEDOPERATION_SILENTFACEWITHMASKFAIL = "FailedOperation.SilentFaceWithMaskFail" // Mouth detection failed. FAILEDOPERATION_SILENTMOUTHLIVEFAIL = "FailedOperation.SilentMouthLiveFail" // Multiple faces are detected in the video. FAILEDOPERATION_SILENTMULTIFACEFAIL = "FailedOperation.SilentMultiFaceFail" // The video might be spoofed. FAILEDOPERATION_SILENTPICTURELIVEFAIL = "FailedOperation.SilentPictureLiveFail" // Real person detection did not reach the passing standard. FAILEDOPERATION_SILENTTHRESHOLD = "FailedOperation.SilentThreshold" // The video is too short. Please capture a video longer than 2 seconds. FAILEDOPERATION_SILENTTOOSHORT = "FailedOperation.SilentTooShort" // Unknown internal error. FAILEDOPERATION_UNKNOWN = "FailedOperation.UnKnown" // The lighting is too dim. INTERNALERROR_ACTIONLIGHTDARK = "InternalError.ActionLightDark" // The lighting is too strong. INTERNALERROR_ACTIONLIGHTSTRONG = "InternalError.ActionLightStrong" // Failed to detect a full face. INTERNALERROR_ACTIONNODETECTFACE = "InternalError.ActionNodetectFace" // The similarity did not reach the passing standard. INTERNALERROR_COMPARELOWSIMILARITY = "InternalError.CompareLowSimilarity" // The resolution of the image passed in is too low. Please upload a new one. INTERNALERROR_LIFEPHOTOPOORQUALITY = "InternalError.LifePhotoPoorQuality" // The image passed in is too large or too small. INTERNALERROR_LIFEPHOTOSIZEERROR = "InternalError.LifePhotoSizeError" // Invalid parameter. INVALIDPARAMETER = "InvalidParameter" // Incorrect parameter value. INVALIDPARAMETERVALUE = "InvalidParameterValue" // Unauthorized operation. UNAUTHORIZEDOPERATION = "UnauthorizedOperation" // The account is in arrears. UNAUTHORIZEDOPERATION_ARREARS = "UnauthorizedOperation.Arrears" // Identity verification has not been completed for the account. UNAUTHORIZEDOPERATION_NONAUTHORIZE = "UnauthorizedOperation.NonAuthorize" // The service has not been activated. UNAUTHORIZEDOPERATION_NONACTIVATED = "UnauthorizedOperation.Nonactivated" // Unsupported operation. UNSUPPORTEDOPERATION = "UnsupportedOperation" )
const APIVersion = "2018-03-01"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)
func NewClientWithSecretId ¶
Deprecated
func (*Client) DetectReflectLivenessAndCompare ¶
func (c *Client) DetectReflectLivenessAndCompare(request *DetectReflectLivenessAndCompareRequest) (response *DetectReflectLivenessAndCompareResponse, err error)
DetectReflectLivenessAndCompare This API is used to detect liveness with the package generated by the Updated E-KYC SDK, and to compare the person detected with that in the image passed in.
error code that may be returned:
FAILEDOPERATION_ACTIONLIGHTDARK = "FailedOperation.ActionLightDark" FAILEDOPERATION_ACTIONLIGHTSTRONG = "FailedOperation.ActionLightStrong" FAILEDOPERATION_DOWNLOADERROR = "FailedOperation.DownLoadError" FAILEDOPERATION_DOWNLOADTIMEOUTERROR = "FailedOperation.DownLoadTimeoutError" FAILEDOPERATION_IMAGEBLUR = "FailedOperation.ImageBlur" FAILEDOPERATION_IMAGEDECODEFAILED = "FailedOperation.ImageDecodeFailed" FAILEDOPERATION_IMAGESIZETOOLARGE = "FailedOperation.ImageSizeTooLarge" FAILEDOPERATION_LIFEPHOTODETECTFAKE = "FailedOperation.LifePhotoDetectFake" FAILEDOPERATION_LIFEPHOTOSIZEERROR = "FailedOperation.LifePhotoSizeError" FAILEDOPERATION_LIVESSDETECTFAIL = "FailedOperation.LivessDetectFail" FAILEDOPERATION_LIVESSDETECTFAKE = "FailedOperation.LivessDetectFake" FAILEDOPERATION_LIVESSSYSTEMERROR = "FailedOperation.LivessSystemError" FAILEDOPERATION_LIVESSUNKNOWNERROR = "FailedOperation.LivessUnknownError" FAILEDOPERATION_SILENTDETECTFAIL = "FailedOperation.SilentDetectFail" FAILEDOPERATION_SILENTFACEDETECTFAIL = "FailedOperation.SilentFaceDetectFail" FAILEDOPERATION_SILENTFACEQUALITYFAIL = "FailedOperation.SilentFaceQualityFail" FAILEDOPERATION_SILENTMULTIFACEFAIL = "FailedOperation.SilentMultiFaceFail" FAILEDOPERATION_SILENTPICTURELIVEFAIL = "FailedOperation.SilentPictureLiveFail" FAILEDOPERATION_SILENTTHRESHOLD = "FailedOperation.SilentThreshold" INTERNALERROR_ACTIONLIGHTDARK = "InternalError.ActionLightDark" INTERNALERROR_ACTIONLIGHTSTRONG = "InternalError.ActionLightStrong" INTERNALERROR_ACTIONNODETECTFACE = "InternalError.ActionNodetectFace" INTERNALERROR_COMPARELOWSIMILARITY = "InternalError.CompareLowSimilarity" INTERNALERROR_LIFEPHOTOPOORQUALITY = "InternalError.LifePhotoPoorQuality" INTERNALERROR_LIFEPHOTOSIZEERROR = "InternalError.LifePhotoSizeError"
func (*Client) DetectReflectLivenessAndCompareWithContext ¶
func (c *Client) DetectReflectLivenessAndCompareWithContext(ctx context.Context, request *DetectReflectLivenessAndCompareRequest) (response *DetectReflectLivenessAndCompareResponse, err error)
DetectReflectLivenessAndCompare This API is used to detect liveness with the package generated by the Updated E-KYC SDK, and to compare the person detected with that in the image passed in.
error code that may be returned:
FAILEDOPERATION_ACTIONLIGHTDARK = "FailedOperation.ActionLightDark" FAILEDOPERATION_ACTIONLIGHTSTRONG = "FailedOperation.ActionLightStrong" FAILEDOPERATION_DOWNLOADERROR = "FailedOperation.DownLoadError" FAILEDOPERATION_DOWNLOADTIMEOUTERROR = "FailedOperation.DownLoadTimeoutError" FAILEDOPERATION_IMAGEBLUR = "FailedOperation.ImageBlur" FAILEDOPERATION_IMAGEDECODEFAILED = "FailedOperation.ImageDecodeFailed" FAILEDOPERATION_IMAGESIZETOOLARGE = "FailedOperation.ImageSizeTooLarge" FAILEDOPERATION_LIFEPHOTODETECTFAKE = "FailedOperation.LifePhotoDetectFake" FAILEDOPERATION_LIFEPHOTOSIZEERROR = "FailedOperation.LifePhotoSizeError" FAILEDOPERATION_LIVESSDETECTFAIL = "FailedOperation.LivessDetectFail" FAILEDOPERATION_LIVESSDETECTFAKE = "FailedOperation.LivessDetectFake" FAILEDOPERATION_LIVESSSYSTEMERROR = "FailedOperation.LivessSystemError" FAILEDOPERATION_LIVESSUNKNOWNERROR = "FailedOperation.LivessUnknownError" FAILEDOPERATION_SILENTDETECTFAIL = "FailedOperation.SilentDetectFail" FAILEDOPERATION_SILENTFACEDETECTFAIL = "FailedOperation.SilentFaceDetectFail" FAILEDOPERATION_SILENTFACEQUALITYFAIL = "FailedOperation.SilentFaceQualityFail" FAILEDOPERATION_SILENTMULTIFACEFAIL = "FailedOperation.SilentMultiFaceFail" FAILEDOPERATION_SILENTPICTURELIVEFAIL = "FailedOperation.SilentPictureLiveFail" FAILEDOPERATION_SILENTTHRESHOLD = "FailedOperation.SilentThreshold" INTERNALERROR_ACTIONLIGHTDARK = "InternalError.ActionLightDark" INTERNALERROR_ACTIONLIGHTSTRONG = "InternalError.ActionLightStrong" INTERNALERROR_ACTIONNODETECTFACE = "InternalError.ActionNodetectFace" INTERNALERROR_COMPARELOWSIMILARITY = "InternalError.CompareLowSimilarity" INTERNALERROR_LIFEPHOTOPOORQUALITY = "InternalError.LifePhotoPoorQuality" INTERNALERROR_LIFEPHOTOSIZEERROR = "InternalError.LifePhotoSizeError"
func (*Client) LivenessCompare ¶
func (c *Client) LivenessCompare(request *LivenessCompareRequest) (response *LivenessCompareResponse, err error)
LivenessCompare This API is used to pass in a video and a photo, determine whether the person in the video is real, and if yes, then determine whether the person in the video is the same as that in the photo.
error code that may be returned:
FAILEDOPERATION_ACTIONCLOSEEYE = "FailedOperation.ActionCloseEye" FAILEDOPERATION_ACTIONFACECLOSE = "FailedOperation.ActionFaceClose" FAILEDOPERATION_ACTIONFACEFAR = "FailedOperation.ActionFaceFar" FAILEDOPERATION_ACTIONFACELEFT = "FailedOperation.ActionFaceLeft" FAILEDOPERATION_ACTIONFACERIGHT = "FailedOperation.ActionFaceRight" FAILEDOPERATION_ACTIONFIRSTACTION = "FailedOperation.ActionFirstAction" FAILEDOPERATION_ACTIONLIGHTDARK = "FailedOperation.ActionLightDark" FAILEDOPERATION_ACTIONLIGHTSTRONG = "FailedOperation.ActionLightStrong" FAILEDOPERATION_ACTIONNODETECTFACE = "FailedOperation.ActionNodetectFace" FAILEDOPERATION_ACTIONOPENMOUTH = "FailedOperation.ActionOpenMouth" FAILEDOPERATION_COMPAREFAIL = "FailedOperation.CompareFail" FAILEDOPERATION_COMPARELOWSIMILARITY = "FailedOperation.CompareLowSimilarity" FAILEDOPERATION_COMPARESYSTEMERROR = "FailedOperation.CompareSystemError" FAILEDOPERATION_DOWNLOADERROR = "FailedOperation.DownLoadError" FAILEDOPERATION_DOWNLOADTIMEOUTERROR = "FailedOperation.DownLoadTimeoutError" FAILEDOPERATION_LIFEPHOTODETECTFACES = "FailedOperation.LifePhotoDetectFaces" FAILEDOPERATION_LIFEPHOTODETECTFAKE = "FailedOperation.LifePhotoDetectFake" FAILEDOPERATION_LIFEPHOTODETECTNOFACES = "FailedOperation.LifePhotoDetectNoFaces" FAILEDOPERATION_LIFEPHOTOPOORQUALITY = "FailedOperation.LifePhotoPoorQuality" FAILEDOPERATION_LIFEPHOTOSIZEERROR = "FailedOperation.LifePhotoSizeError" FAILEDOPERATION_LIPFACEINCOMPLETE = "FailedOperation.LipFaceIncomplete" FAILEDOPERATION_LIPMOVESMALL = "FailedOperation.LipMoveSmall" FAILEDOPERATION_LIPNETFAILED = "FailedOperation.LipNetFailed" FAILEDOPERATION_LIPSIZEERROR = "FailedOperation.LipSizeError" FAILEDOPERATION_LIPVIDEOINVALID = "FailedOperation.LipVideoInvalid" FAILEDOPERATION_LIPVIDEOQUAILITY = "FailedOperation.LipVideoQuaility" FAILEDOPERATION_LIPVOICEDETECT = "FailedOperation.LipVoiceDetect" FAILEDOPERATION_LIPVOICELOW = "FailedOperation.LipVoiceLow" FAILEDOPERATION_LIPVOICERECOGNIZE = "FailedOperation.LipVoiceRecognize" FAILEDOPERATION_LIVESSBESTFRAMEERROR = "FailedOperation.LivessBestFrameError" FAILEDOPERATION_LIVESSDETECTFAIL = "FailedOperation.LivessDetectFail" FAILEDOPERATION_LIVESSDETECTFAKE = "FailedOperation.LivessDetectFake" FAILEDOPERATION_LIVESSSYSTEMERROR = "FailedOperation.LivessSystemError" FAILEDOPERATION_LIVESSUNKNOWNERROR = "FailedOperation.LivessUnknownError" FAILEDOPERATION_SILENTDETECTFAIL = "FailedOperation.SilentDetectFail" FAILEDOPERATION_SILENTEYELIVEFAIL = "FailedOperation.SilentEyeLiveFail" FAILEDOPERATION_SILENTFACEDETECTFAIL = "FailedOperation.SilentFaceDetectFail" FAILEDOPERATION_SILENTFACEQUALITYFAIL = "FailedOperation.SilentFaceQualityFail" FAILEDOPERATION_SILENTFACEWITHMASKFAIL = "FailedOperation.SilentFaceWithMaskFail" FAILEDOPERATION_SILENTMOUTHLIVEFAIL = "FailedOperation.SilentMouthLiveFail" FAILEDOPERATION_SILENTMULTIFACEFAIL = "FailedOperation.SilentMultiFaceFail" FAILEDOPERATION_SILENTPICTURELIVEFAIL = "FailedOperation.SilentPictureLiveFail" FAILEDOPERATION_SILENTTHRESHOLD = "FailedOperation.SilentThreshold" FAILEDOPERATION_SILENTTOOSHORT = "FailedOperation.SilentTooShort" FAILEDOPERATION_UNKNOWN = "FailedOperation.UnKnown" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETERVALUE = "InvalidParameterValue" UNAUTHORIZEDOPERATION = "UnauthorizedOperation" UNAUTHORIZEDOPERATION_ARREARS = "UnauthorizedOperation.Arrears" UNAUTHORIZEDOPERATION_NONAUTHORIZE = "UnauthorizedOperation.NonAuthorize" UNAUTHORIZEDOPERATION_NONACTIVATED = "UnauthorizedOperation.Nonactivated" UNSUPPORTEDOPERATION = "UnsupportedOperation"
func (*Client) LivenessCompareWithContext ¶
func (c *Client) LivenessCompareWithContext(ctx context.Context, request *LivenessCompareRequest) (response *LivenessCompareResponse, err error)
LivenessCompare This API is used to pass in a video and a photo, determine whether the person in the video is real, and if yes, then determine whether the person in the video is the same as that in the photo.
error code that may be returned:
FAILEDOPERATION_ACTIONCLOSEEYE = "FailedOperation.ActionCloseEye" FAILEDOPERATION_ACTIONFACECLOSE = "FailedOperation.ActionFaceClose" FAILEDOPERATION_ACTIONFACEFAR = "FailedOperation.ActionFaceFar" FAILEDOPERATION_ACTIONFACELEFT = "FailedOperation.ActionFaceLeft" FAILEDOPERATION_ACTIONFACERIGHT = "FailedOperation.ActionFaceRight" FAILEDOPERATION_ACTIONFIRSTACTION = "FailedOperation.ActionFirstAction" FAILEDOPERATION_ACTIONLIGHTDARK = "FailedOperation.ActionLightDark" FAILEDOPERATION_ACTIONLIGHTSTRONG = "FailedOperation.ActionLightStrong" FAILEDOPERATION_ACTIONNODETECTFACE = "FailedOperation.ActionNodetectFace" FAILEDOPERATION_ACTIONOPENMOUTH = "FailedOperation.ActionOpenMouth" FAILEDOPERATION_COMPAREFAIL = "FailedOperation.CompareFail" FAILEDOPERATION_COMPARELOWSIMILARITY = "FailedOperation.CompareLowSimilarity" FAILEDOPERATION_COMPARESYSTEMERROR = "FailedOperation.CompareSystemError" FAILEDOPERATION_DOWNLOADERROR = "FailedOperation.DownLoadError" FAILEDOPERATION_DOWNLOADTIMEOUTERROR = "FailedOperation.DownLoadTimeoutError" FAILEDOPERATION_LIFEPHOTODETECTFACES = "FailedOperation.LifePhotoDetectFaces" FAILEDOPERATION_LIFEPHOTODETECTFAKE = "FailedOperation.LifePhotoDetectFake" FAILEDOPERATION_LIFEPHOTODETECTNOFACES = "FailedOperation.LifePhotoDetectNoFaces" FAILEDOPERATION_LIFEPHOTOPOORQUALITY = "FailedOperation.LifePhotoPoorQuality" FAILEDOPERATION_LIFEPHOTOSIZEERROR = "FailedOperation.LifePhotoSizeError" FAILEDOPERATION_LIPFACEINCOMPLETE = "FailedOperation.LipFaceIncomplete" FAILEDOPERATION_LIPMOVESMALL = "FailedOperation.LipMoveSmall" FAILEDOPERATION_LIPNETFAILED = "FailedOperation.LipNetFailed" FAILEDOPERATION_LIPSIZEERROR = "FailedOperation.LipSizeError" FAILEDOPERATION_LIPVIDEOINVALID = "FailedOperation.LipVideoInvalid" FAILEDOPERATION_LIPVIDEOQUAILITY = "FailedOperation.LipVideoQuaility" FAILEDOPERATION_LIPVOICEDETECT = "FailedOperation.LipVoiceDetect" FAILEDOPERATION_LIPVOICELOW = "FailedOperation.LipVoiceLow" FAILEDOPERATION_LIPVOICERECOGNIZE = "FailedOperation.LipVoiceRecognize" FAILEDOPERATION_LIVESSBESTFRAMEERROR = "FailedOperation.LivessBestFrameError" FAILEDOPERATION_LIVESSDETECTFAIL = "FailedOperation.LivessDetectFail" FAILEDOPERATION_LIVESSDETECTFAKE = "FailedOperation.LivessDetectFake" FAILEDOPERATION_LIVESSSYSTEMERROR = "FailedOperation.LivessSystemError" FAILEDOPERATION_LIVESSUNKNOWNERROR = "FailedOperation.LivessUnknownError" FAILEDOPERATION_SILENTDETECTFAIL = "FailedOperation.SilentDetectFail" FAILEDOPERATION_SILENTEYELIVEFAIL = "FailedOperation.SilentEyeLiveFail" FAILEDOPERATION_SILENTFACEDETECTFAIL = "FailedOperation.SilentFaceDetectFail" FAILEDOPERATION_SILENTFACEQUALITYFAIL = "FailedOperation.SilentFaceQualityFail" FAILEDOPERATION_SILENTFACEWITHMASKFAIL = "FailedOperation.SilentFaceWithMaskFail" FAILEDOPERATION_SILENTMOUTHLIVEFAIL = "FailedOperation.SilentMouthLiveFail" FAILEDOPERATION_SILENTMULTIFACEFAIL = "FailedOperation.SilentMultiFaceFail" FAILEDOPERATION_SILENTPICTURELIVEFAIL = "FailedOperation.SilentPictureLiveFail" FAILEDOPERATION_SILENTTHRESHOLD = "FailedOperation.SilentThreshold" FAILEDOPERATION_SILENTTOOSHORT = "FailedOperation.SilentTooShort" FAILEDOPERATION_UNKNOWN = "FailedOperation.UnKnown" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETERVALUE = "InvalidParameterValue" UNAUTHORIZEDOPERATION = "UnauthorizedOperation" UNAUTHORIZEDOPERATION_ARREARS = "UnauthorizedOperation.Arrears" UNAUTHORIZEDOPERATION_NONAUTHORIZE = "UnauthorizedOperation.NonAuthorize" UNAUTHORIZEDOPERATION_NONACTIVATED = "UnauthorizedOperation.Nonactivated" UNSUPPORTEDOPERATION = "UnsupportedOperation"
type DetectReflectLivenessAndCompareRequest ¶
type DetectReflectLivenessAndCompareRequest struct { *tchttp.BaseRequest // URL of the liveness data package generated by the SDK LiveDataUrl *string `json:"LiveDataUrl,omitempty" name:"LiveDataUrl"` // MD5 hash value of the liveness data package generated by the SDK LiveDataMd5 *string `json:"LiveDataMd5,omitempty" name:"LiveDataMd5"` // URL of the target image for comparison ImageUrl *string `json:"ImageUrl,omitempty" name:"ImageUrl"` // MD5 hash value of the target image for comparison ImageMd5 *string `json:"ImageMd5,omitempty" name:"ImageMd5"` }
func NewDetectReflectLivenessAndCompareRequest ¶
func NewDetectReflectLivenessAndCompareRequest() (request *DetectReflectLivenessAndCompareRequest)
func (*DetectReflectLivenessAndCompareRequest) FromJsonString ¶
func (r *DetectReflectLivenessAndCompareRequest) 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 (*DetectReflectLivenessAndCompareRequest) ToJsonString ¶
func (r *DetectReflectLivenessAndCompareRequest) ToJsonString() string
type DetectReflectLivenessAndCompareResponse ¶
type DetectReflectLivenessAndCompareResponse struct { *tchttp.BaseResponse Response *struct { // URL of the best screenshot (in JPG format) of the video after successful verification BestFrameUrl *string `json:"BestFrameUrl,omitempty" name:"BestFrameUrl"` // MD5 hash value of the best screenshot of the video after successful verification BestFrameMd5 *string `json:"BestFrameMd5,omitempty" name:"BestFrameMd5"` // Service error code. `Success` will be returned for success. For error information, please see the `FailedOperation` section in the error code list below. Result *string `json:"Result,omitempty" name:"Result"` // Service result description Description *string `json:"Description,omitempty" name:"Description"` // Similarity. Value range: [0.00, 100.00]. As a recommendation, when the similarity is greater than or equal to 70, it can be determined that the two faces are of the same person. You can adjust the threshold according to your specific scenario (the FAR at the threshold of 70 is 0.1%, and FAR at the threshold of 80 is 0.01%). Sim *float64 `json:"Sim,omitempty" name:"Sim"` // The unique request ID, which is returned for each request. RequestId is required for locating a problem. RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewDetectReflectLivenessAndCompareResponse ¶
func NewDetectReflectLivenessAndCompareResponse() (response *DetectReflectLivenessAndCompareResponse)
func (*DetectReflectLivenessAndCompareResponse) FromJsonString ¶
func (r *DetectReflectLivenessAndCompareResponse) 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 (*DetectReflectLivenessAndCompareResponse) ToJsonString ¶
func (r *DetectReflectLivenessAndCompareResponse) ToJsonString() string
type LivenessCompareRequest ¶
type LivenessCompareRequest struct { *tchttp.BaseRequest // Liveness detection type. Valid values: LIP/ACTION/SILENT. // LIP: numeric mode; ACTION: motion mode; SILENT: silent mode. You need to select a mode to input. LivenessType *string `json:"LivenessType,omitempty" name:"LivenessType"` // Base64 string of the image for face comparison. // The size of the Base64-encoded image data can be up to 3 MB. JPG and PNG formats are supported. // Please use the standard Base64 encoding scheme (with the "=" padding). For the encoding conventions, please see RFC 4648. // // Either the `ImageUrl` or `ImageBase64` of the image must be provided. If both are provided, only `ImageBase64` will be used. ImageBase64 *string `json:"ImageBase64,omitempty" name:"ImageBase64"` // URL of the image for face comparison. The size of the downloaded image after Base64 encoding can be up to 3 MB. JPG and PNG formats are supported. // // Either the `ImageUrl` or `ImageBase64` of the image must be provided. If both are provided, only `ImageBase64` will be used. // // We recommend you store the image in Tencent Cloud, as a Tencent Cloud URL can guarantee higher download speed and stability. The download speed and stability of non-Tencent Cloud URLs may be low. ImageUrl *string `json:"ImageUrl,omitempty" name:"ImageUrl"` // Lip mode: set this parameter to a custom 4-digit verification code. // Action mode: set this parameter to a custom action sequence (e.g., `2,1` or `1,2`). // Silent mode: do not pass in this parameter. ValidateData *string `json:"ValidateData,omitempty" name:"ValidateData"` // Optional configuration (a JSON string) // { // "BestFrameNum": 2 // Return multiple best screenshots. Value range: 2−10 // } Optional *string `json:"Optional,omitempty" name:"Optional"` // Base64 string of the video for liveness detection. // The size of the Base64-encoded video data can be up to 8 MB. MP4, AVI, and FLV formats are supported. // Please use the standard Base64 encoding scheme (with the "=" padding). For the encoding conventions, please see RFC 4648. // // Either the `VideoUrl` or `VideoBase64` of the video must be provided. If both are provided, only `VideoBase64` will be used. VideoBase64 *string `json:"VideoBase64,omitempty" name:"VideoBase64"` // URL of the video for liveness detection. The size of the downloaded video after Base64 encoding can be up to 8 MB. It takes no more than 4 seconds to download. MP4, AVI, and FLV formats are supported. // // Either the `VideoUrl` or `VideoBase64` of the video must be provided. If both are provided, only `VideoBase64` will be used. // // We recommend you store the video in Tencent Cloud, as a Tencent Cloud URL can guarantee higher download speed and stability. The download speed and stability of non-Tencent Cloud URLs may be low. VideoUrl *string `json:"VideoUrl,omitempty" name:"VideoUrl"` }
func NewLivenessCompareRequest ¶
func NewLivenessCompareRequest() (request *LivenessCompareRequest)
func (*LivenessCompareRequest) FromJsonString ¶
func (r *LivenessCompareRequest) 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 (*LivenessCompareRequest) ToJsonString ¶
func (r *LivenessCompareRequest) ToJsonString() string
type LivenessCompareResponse ¶
type LivenessCompareResponse struct { *tchttp.BaseResponse Response *struct { // The best screenshot of the video after successful verification. The photo is Base64-encoded and in JPG format. BestFrameBase64 *string `json:"BestFrameBase64,omitempty" name:"BestFrameBase64"` // Similarity. Value range: [0.00, 100.00]. As a recommendation, when the similarity is greater than or equal to 70, it can be determined that the two faces are of the same person. You can adjust the threshold according to your specific scenario (the FAR at the threshold of 70 is 0.1%, and FAR at the threshold of 80 is 0.01%). Sim *float64 `json:"Sim,omitempty" name:"Sim"` // Service error code. `Success` will be returned for success. For error information, please see the `FailedOperation` section in the error code list below. Result *string `json:"Result,omitempty" name:"Result"` // Service result description. Description *string `json:"Description,omitempty" name:"Description"` // BestFrameList []*string `json:"BestFrameList,omitempty" name:"BestFrameList"` // The unique request ID, which is returned for each request. RequestId is required for locating a problem. RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` }
func NewLivenessCompareResponse ¶
func NewLivenessCompareResponse() (response *LivenessCompareResponse)
func (*LivenessCompareResponse) FromJsonString ¶
func (r *LivenessCompareResponse) 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 (*LivenessCompareResponse) ToJsonString ¶
func (r *LivenessCompareResponse) ToJsonString() string