Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateUploadUrl(request *CreateUploadUrlRequest) (response *CreateUploadUrlResponse, err error)
- func (c *Client) CreateUploadUrlWithContext(ctx context.Context, request *CreateUploadUrlRequest) (response *CreateUploadUrlResponse, err error)
- 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) GenerateReflectSequence(request *GenerateReflectSequenceRequest) (response *GenerateReflectSequenceResponse, err error)
- func (c *Client) GenerateReflectSequenceWithContext(ctx context.Context, request *GenerateReflectSequenceRequest) (response *GenerateReflectSequenceResponse, 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 CreateUploadUrlRequest
- type CreateUploadUrlResponse
- type DetectReflectLivenessAndCompareRequest
- type DetectReflectLivenessAndCompareResponse
- type GenerateReflectSequenceRequest
- type GenerateReflectSequenceResponse
- 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" // No movement is 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" // Internal error. INTERNALERROR = "InternalError" // 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) CreateUploadUrl ¶
func (c *Client) CreateUploadUrl(request *CreateUploadUrlRequest) (response *CreateUploadUrlResponse, err error)
CreateUploadUrl This API is used to generate a temporary `UploadUrl` for uploading resource files (with the `HTTP PUT` method). After resource upload, `ResourceUrl` will be passed to the `TargetAction` API to complete the resource passing (specific fields vary by case).
The data will be stored in a COS bucket in the region specified by the parameter `Region` for two hours.
error code that may be returned:
INTERNALERROR = "InternalError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETERVALUE = "InvalidParameterValue"
func (*Client) CreateUploadUrlWithContext ¶
func (c *Client) CreateUploadUrlWithContext(ctx context.Context, request *CreateUploadUrlRequest) (response *CreateUploadUrlResponse, err error)
CreateUploadUrl This API is used to generate a temporary `UploadUrl` for uploading resource files (with the `HTTP PUT` method). After resource upload, `ResourceUrl` will be passed to the `TargetAction` API to complete the resource passing (specific fields vary by case).
The data will be stored in a COS bucket in the region specified by the parameter `Region` for two hours.
error code that may be returned:
INTERNALERROR = "InternalError" INVALIDPARAMETER = "InvalidParameter" INVALIDPARAMETERVALUE = "InvalidParameterValue"
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 liveness comparison (reflection-based) SDK, and to compare the person detected with that in the image passed in.
The image and the data generated with the SDK must be stored in COS, and the region of the COS bucket must be same as that of requests made with this API. We recommend that you pass resources with upload link APIs.
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 liveness comparison (reflection-based) SDK, and to compare the person detected with that in the image passed in.
The image and the data generated with the SDK must be stored in COS, and the region of the COS bucket must be same as that of requests made with this API. We recommend that you pass resources with upload link APIs.
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) GenerateReflectSequence ¶
func (c *Client) GenerateReflectSequence(request *GenerateReflectSequenceRequest) (response *GenerateReflectSequenceResponse, err error)
GenerateReflectSequence This API is used to generate an appropriate light sequence based on the information collected by the liveness comparison (reflection-based) SDK and pass the light sequence into the SDK to start the identity verification process.
The data generated with the SDK must be stored in COS, and the region of the COS bucket must be same as that of requests made with this API. We recommend that you pass resources with upload link APIs.
error code that may be returned:
FAILEDOPERATION_DOWNLOADERROR = "FailedOperation.DownLoadError" FAILEDOPERATION_DOWNLOADTIMEOUTERROR = "FailedOperation.DownLoadTimeoutError"
func (*Client) GenerateReflectSequenceWithContext ¶
func (c *Client) GenerateReflectSequenceWithContext(ctx context.Context, request *GenerateReflectSequenceRequest) (response *GenerateReflectSequenceResponse, err error)
GenerateReflectSequence This API is used to generate an appropriate light sequence based on the information collected by the liveness comparison (reflection-based) SDK and pass the light sequence into the SDK to start the identity verification process.
The data generated with the SDK must be stored in COS, and the region of the COS bucket must be same as that of requests made with this API. We recommend that you pass resources with upload link APIs.
error code that may be returned:
FAILEDOPERATION_DOWNLOADERROR = "FailedOperation.DownLoadError" FAILEDOPERATION_DOWNLOADTIMEOUTERROR = "FailedOperation.DownLoadTimeoutError"
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 CreateUploadUrlRequest ¶
type CreateUploadUrlRequest struct { *tchttp.BaseRequest // Target API TargetAction *string `json:"TargetAction,omitempty" name:"TargetAction"` }
func NewCreateUploadUrlRequest ¶
func NewCreateUploadUrlRequest() (request *CreateUploadUrlRequest)
func (*CreateUploadUrlRequest) FromJsonString ¶
func (r *CreateUploadUrlRequest) 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 (*CreateUploadUrlRequest) ToJsonString ¶
func (r *CreateUploadUrlRequest) ToJsonString() string
type CreateUploadUrlResponse ¶
type CreateUploadUrlResponse struct { *tchttp.BaseResponse Response *struct { // The URL for uploading contents with the `HTTP PUT` method. UploadUrl *string `json:"UploadUrl,omitempty" name:"UploadUrl"` // The resource URL obtained after this upload is completed and to be passed in where it is required later. ResourceUrl *string `json:"ResourceUrl,omitempty" name:"ResourceUrl"` // The point in time when the upload/download link expires, which is a 10-bit Unix timestamp. ExpiredTimestamp *int64 `json:"ExpiredTimestamp,omitempty" name:"ExpiredTimestamp"` // 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 NewCreateUploadUrlResponse ¶
func NewCreateUploadUrlResponse() (response *CreateUploadUrlResponse)
func (*CreateUploadUrlResponse) FromJsonString ¶
func (r *CreateUploadUrlResponse) 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 (*CreateUploadUrlResponse) ToJsonString ¶
func (r *CreateUploadUrlResponse) ToJsonString() string
type DetectReflectLivenessAndCompareRequest ¶
type DetectReflectLivenessAndCompareRequest struct { *tchttp.BaseRequest // URL of the liveness detection data package generated by the SDK LiveDataUrl *string `json:"LiveDataUrl,omitempty" name:"LiveDataUrl"` // MD5 hash value (32-bit) of the liveness detection data package generated by the SDK, which is used to verify the LiveData consistency. LiveDataMd5 *string `json:"LiveDataMd5,omitempty" name:"LiveDataMd5"` // URL of the target image for comparison ImageUrl *string `json:"ImageUrl,omitempty" name:"ImageUrl"` // MD5 hash value (32-bit) of the target image for comparison, which is used to verify the `Image` consistency. 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 { // Temporary URL of the best screenshot (.jpg) of the video after successful verification. Both the screenshot and the URL are valid for two hours only, so you need to download the screenshot within this period. BestFrameUrl *string `json:"BestFrameUrl,omitempty" name:"BestFrameUrl"` // MD5 hash value (32-bit) of the best screenshot of the video after successful verification, which is used to verify the `BestFrame` consistency. BestFrameMd5 *string `json:"BestFrameMd5,omitempty" name:"BestFrameMd5"` // Service error code. `Success` will be returned for success. For error information, 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 GenerateReflectSequenceRequest ¶
type GenerateReflectSequenceRequest struct { *tchttp.BaseRequest // The resource URL of the data package generated by the SDK. DeviceDataUrl *string `json:"DeviceDataUrl,omitempty" name:"DeviceDataUrl"` // The MD5 hash value of the data package generated by the SDK. DeviceDataMd5 *string `json:"DeviceDataMd5,omitempty" name:"DeviceDataMd5"` // 1 - silent // 2 - blinking // 3 - light // 4 - blinking + light (default) SecurityLevel *string `json:"SecurityLevel,omitempty" name:"SecurityLevel"` }
func NewGenerateReflectSequenceRequest ¶
func NewGenerateReflectSequenceRequest() (request *GenerateReflectSequenceRequest)
func (*GenerateReflectSequenceRequest) FromJsonString ¶
func (r *GenerateReflectSequenceRequest) 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 (*GenerateReflectSequenceRequest) ToJsonString ¶
func (r *GenerateReflectSequenceRequest) ToJsonString() string
type GenerateReflectSequenceResponse ¶
type GenerateReflectSequenceResponse struct { *tchttp.BaseResponse Response *struct { // The resource URL of the light sequence, which needs to be downloaded and passed through to the SDK to start the identity verification process. ReflectSequenceUrl *string `json:"ReflectSequenceUrl,omitempty" name:"ReflectSequenceUrl"` // The MD5 hash value of the light sequence, which is used to check whether the light sequence is altered. ReflectSequenceMd5 *string `json:"ReflectSequenceMd5,omitempty" name:"ReflectSequenceMd5"` // 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 NewGenerateReflectSequenceResponse ¶
func NewGenerateReflectSequenceResponse() (response *GenerateReflectSequenceResponse)
func (*GenerateReflectSequenceResponse) FromJsonString ¶
func (r *GenerateReflectSequenceResponse) 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 (*GenerateReflectSequenceResponse) ToJsonString ¶
func (r *GenerateReflectSequenceResponse) 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