Documentation ¶
Index ¶
- func CheckHmac(message, messageMAC, key []byte) bool
- type CreateSDKToken
- type OnfidoApplicant
- type OnfidoApplicantCreation
- type OnfidoCheck
- type OnfidoCheckCreation
- type OnfidoObject
- type OnfidoPayload
- type OnfidoStatus
- type OnfidoWebHook
- type Report
- type SDKToken
- type UserController
- type UserPost
- type UserSignupSignature
- type UserStatus
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateSDKToken ¶
type OnfidoApplicant ¶
type OnfidoApplicant struct {
ID string `json:"id"`
}
func CreateOnfidoApplicant ¶
func CreateOnfidoApplicant(name, lastName, email string) *OnfidoApplicant
type OnfidoApplicantCreation ¶
type OnfidoCheck ¶
https://documentation.onfido.com/#check-object
func CreateOnfidoCheck ¶
func CreateOnfidoCheck(applicantId string) *OnfidoCheck
func GetOnfidoCheck ¶
func GetOnfidoCheck(applicantId, checkId string) OnfidoCheck
func (*OnfidoCheck) IsClear ¶
func (this *OnfidoCheck) IsClear() bool
type OnfidoCheckCreation ¶
type OnfidoCheckCreation struct {
Reports []Report `json:"reports"`
}
type OnfidoObject ¶
type OnfidoPayload ¶
type OnfidoPayload struct { Action string `json:"action"` ResourceType string `json:"resource_type"` Object OnfidoObject `json:"object"` }
type OnfidoStatus ¶
type OnfidoStatus int
const ( PENDING_DOCUMENT_UPLOAD OnfidoStatus = iota WAITING_FOR_APPROVAL ACCEPTED DENIED )
func (OnfidoStatus) String ¶
func (this OnfidoStatus) String() string
type OnfidoWebHook ¶
type OnfidoWebHook struct {
Payload OnfidoPayload `json:"payload"`
}
func (*OnfidoWebHook) IsReportCompleted ¶
func (this *OnfidoWebHook) IsReportCompleted() bool
type UserController ¶
type UserController struct {
beego.Controller
}
Operations about users
func (*UserController) ApproveUser ¶
func (controller *UserController) ApproveUser()
@Title Mark user as approved, testing purposes only @Description Mark user as approved. It's GET to allow not technical people to trigger it @Success 200 @Failure 400 Malformed request @router /users/approval/0x:address([a-fA-F0-9]+) [get]
func (*UserController) Check ¶
func (controller *UserController) Check()
@Title Liveness probe for Kubernetes @Description It just returns 200 if everything is ok, or 500 if the database is not connecting etc @Success 200 @Failure 400 Malformed request @router /check [get]
func (*UserController) Get ¶
func (controller *UserController) Get()
@Title Get User @Description Retrieves user @Success 200 @Failure 400 Malformed request @router /users/0x:address([a-fA-F0-9]+) [get]
func (*UserController) Post ¶
func (controller *UserController) Post()
@Title Signup User @Description Registers user in the service for the kyc verification @Success 200 @Failure 400 Malformed request @router /users/0x:address([a-fA-F0-9]+) [post]
func (*UserController) Put ¶
func (controller *UserController) Put()
@Title Signal User Report @Description After the user uploads the documents, the frontend reaches this endpoint to create the check @Success 200 @Failure 400 Malformed request @router /users/0x:address([a-fA-F0-9]+) [put]
func (*UserController) WebhookPost ¶
func (controller *UserController) WebhookPost()
@Title Webhook post @Description Called by Onfido when report status changes @Success 200 @Failure 400 Malformed request @router /webhooks [post]
type UserPost ¶
type UserPost struct { Email string `json:"email"` Name string `json:"name"` LastName string `json:"lastName"` Signature UserSignupSignature `json:"signature"` }
type UserSignupSignature ¶
type UserStatus ¶
type UserStatus struct {
Status string `json:"status"`
}