Versions in this module Expand all Collapse all v1 v1.0.5 May 9, 2022 Changes in this version + const BreakdownClear + const BreakdownConsider + const BreakdownUnidentified + const CheckResultClear + const CheckResultConsider + const CheckStatusAwaitingApplicant + const CheckStatusComplete + const CheckStatusInProgress + const CheckStatusPaused + const CheckStatusReopened + const CheckStatusWithdrawn + const ClientVersion + const DocumentSideBack + const DocumentSideFront + const DocumentTypeDrivingLicense + const DocumentTypeIDCard + const DocumentTypePassport + const DocumentTypeTaxID + const DocumentTypeUKBRP + const DocumentTypeUnknown + const DocumentTypeVoterID + const ReportNameDocument + const ReportNameDocumentWithAddress + const ReportNameDocumentWithDrivingLicense + const ReportNameFacialSimilarityPhoto + const ReportNameFacialSimilarityVideo + const ReportNameIdentityEnhanced + const ReportNameKnownFaces + const ReportNameProofOfAddress + const ReportNameRightToWork + const ReportNameWatchlistEnhanced + const ReportNameWatchlistPepsOnly + const ReportNameWatchlistSanctionsOnly + const ReportNameWatchlistStandard + const ReportResultClear + const ReportResultConsider + const ReportResultUnidentified + const ReportSubResultCaution + const ReportSubResultClear + const ReportSubResultRejected + const ReportSubResultSuspected + const SubBreakdownClear + const SubBreakdownConsider + const SubBreakdownUnidentified + const TokenEnv + const WebhookEnvironmentLive + const WebhookEnvironmentSandbox + const WebhookEventCheckCompleted + const WebhookEventCheckFormCompleted + const WebhookEventCheckFormOpened + const WebhookEventCheckReopened + const WebhookEventCheckStarted + const WebhookEventCheckWithdrawn + const WebhookEventReportAwaitingApproval + const WebhookEventReportCancelled + const WebhookEventReportCompleted + const WebhookEventReportInitiated + const WebhookEventReportResumed + const WebhookEventReportWithdrawn + const WebhookSignatureHeader + const WebhookTokenEnv + var DefaultEndpoint = "https://api.eu.onfido.com/v3.1" + var ErrEmptyPostcode = errors.New("empty postcode") + var ErrInvalidWebhookSignature = errors.New("invalid request, payload hash doesn't match signature") + var ErrMissingWebhookToken = errors.New("webhook token not found in environmental variable") + type Address struct + BuildingName string + BuildingNumber string + Country string + EndDate string + FlatNumber string + Postcode string + StartDate string + State string + Street string + SubStreet string + Town string + type Addresses struct + Addresses []*Address + type Applicant struct + Address Address + CreatedAt *time.Time + DOB string + Email string + FirstName string + ID string + IDNumbers []IDNumber + LastName string + MiddleName string + Sandbox bool + Title string + type ApplicantIter struct + func (i *ApplicantIter) Applicant() *Applicant + func (it ApplicantIter) Current() interface{} + func (it ApplicantIter) Err() error + func (it ApplicantIter) Next(ctx context.Context) bool + type Applicants struct + Applicants []*Applicant + type Breakdown struct + Result *BreakdownResult + SubBreakdowns SubBreakdowns + type BreakdownResult string + type BreakdownSubResult string + type Breakdowns map[string]Breakdown + type Check struct + ApplicantID string + ApplicantProvidesData bool + CreatedAt *time.Time + DownloadURI string + FormURI string + Href string + ID string + RedirectURI string + Reports []*Report + Result CheckResult + ResultsURI string + Status CheckStatus + Tags []string + Type CheckType + type CheckIter struct + func (i *CheckIter) Check() *Check + func (it CheckIter) Current() interface{} + func (it CheckIter) Err() error + func (it CheckIter) Next(ctx context.Context) bool + type CheckRequest struct + ApplicantID string + ApplicantProvidesData bool + Async bool + ChargeApplicantForCheck bool + Consider []ReportName + RedirectURI string + ReportNames []string + SupressFormEmails bool + Tags []string + type CheckResult string + type CheckRetrieved struct + ApplicantID string + ApplicantProvidesData bool + CreatedAt *time.Time + DownloadURI string + FormURI string + Href string + ID string + RedirectURI string + Reports []string + Result CheckResult + ResultsURI string + Status CheckStatus + Tags []string + Type CheckType + type CheckStatus string + type CheckType string + type Checks struct + Checks []*Check + type Document struct + ApplicantID string + CreatedAt *time.Time + DownloadHref string + FileName string + FileSize int + FileType string + Href string + ID string + Side DocumentSide + Type DocumentType + type DocumentDownload struct + Data []byte + type DocumentIter struct + func (i *DocumentIter) Document() *Document + func (it DocumentIter) Current() interface{} + func (it DocumentIter) Err() error + func (it DocumentIter) Next(ctx context.Context) bool + type DocumentProcessed map[string]interface + type DocumentRequest struct + ApplicantID string + File io.ReadSeeker + Side DocumentSide + Type DocumentType + type DocumentSide string + type DocumentType string + type Documents struct + Documents []*Document + type Error struct + Err struct{ ... } + Resp *http.Response + func (e *Error) Error() string + type ErrorFields map[string]interface + type HTTPRequester interface + Do func(*http.Request) (*http.Response, error) + type IDNumber struct + StateCode string + Type IDNumberType + Value string + type IDNumberType string + const IDNumberTypeDrivingLicense + const IDNumberTypeIdentityCard + const IDNumberTypeSSN + const IDNumberTypeSocialInsurance + const IDNumberTypeTaxID + type Iter interface + Current func() interface{} + Err func() error + Next func(ctx context.Context) bool + type LivePhoto struct + CreatedAt *time.Time + DownloadHref string + FileName string + FileSize int32 + FileType string + Href string + ID string + type LivePhotoIter struct + func (i *LivePhotoIter) LivePhoto() *LivePhoto + func (it LivePhotoIter) Current() interface{} + func (it LivePhotoIter) Err() error + func (it LivePhotoIter) Next(ctx context.Context) bool + type LiveVideo struct + CreatedAt *time.Time + DownloadHref string + FileName string + FileSize int + FileType string + Href string + ID string + type LiveVideoDownload struct + Data []byte + type LiveVideoIter interface + LiveVideo func() *LiveVideo + type OnfidoClient interface + CancelReport func(ctx context.Context, id string) error + CreateApplicant func(ctx context.Context, a Applicant) (*Applicant, error) + CreateCheck func(ctx context.Context, cr CheckRequest) (*Check, error) + CreateWebhook func(ctx context.Context, wr WebhookRefRequest) (*WebhookRef, error) + DeleteApplicant func(ctx context.Context, id string) error + DeleteWebhook func(ctx context.Context, id string) error + DownloadDocument func(ctx context.Context, id string) (*DocumentDownload, error) + DownloadLiveVideo func(ctx context.Context, id string) (*LiveVideoDownload, error) + GetApplicant func(ctx context.Context, id string) (*Applicant, error) + GetCheck func(ctx context.Context, id string) (*CheckRetrieved, error) + GetCheckExpanded func(ctx context.Context, id string) (*Check, error) + GetDocument func(ctx context.Context, id string) (*Document, error) + GetReport func(ctx context.Context, id string) (*Report, error) + GetResource func(ctx context.Context, href string, v interface{}) error + ListApplicants func() *ApplicantIter + ListChecks func(applicantID string) *CheckIter + ListDocuments func(applicantID string) *DocumentIter + ListLivePhotos func(applicantID string) *LivePhotoIter + ListLiveVideos func(applicantID string) LiveVideoIter + ListReports func(checkID string) *ReportIter + ListWebhooks func() *WebhookRefIter + NewSdkTokenMobile func(ctx context.Context, applicantID, applicationID string) (*SdkToken, error) + NewSdkTokenWeb func(ctx context.Context, applicantID, referrer string) (*SdkToken, error) + PickAddresses func(postcode string) *PickerIter + ResumeCheck func(ctx context.Context, id string) (*Check, error) + ResumeReport func(ctx context.Context, id string) error + SetHTTPClient func(client HTTPRequester) + Token func() Token + UpdateApplicant func(ctx context.Context, a Applicant) (*Applicant, error) + UpdateWebhook func(ctx context.Context, id string, wr WebhookRefRequest) (*WebhookRef, error) + UploadDocument func(ctx context.Context, dr DocumentRequest) (*Document, error) + func NewClient(token string) OnfidoClient + func NewClientFromEnv() (OnfidoClient, error) + type PickerIter struct + func (i *PickerIter) Address() *Address + func (it PickerIter) Current() interface{} + func (it PickerIter) Err() error + func (it PickerIter) Next(ctx context.Context) bool + type Properties map[string]interface + type Report struct + Breakdown Breakdowns + CheckID string + CreatedAt *time.Time + Documents []DocumentProcessed + Href string + ID string + Name ReportName + Options map[string]interface{} + Properties Properties + Result ReportResult + Status string + SubResult ReportSubResult + type ReportIter struct + func (i *ReportIter) Report() *Report + func (it ReportIter) Current() interface{} + func (it ReportIter) Err() error + func (it ReportIter) Next(ctx context.Context) bool + type ReportName string + type ReportResult string + type ReportSubResult string + type Reports struct + Reports []*Report + type SdkToken struct + ApplicantID string + ApplicationID string + Referrer string + Token string + type SubBreakdown struct + Properties Properties + Result *BreakdownSubResult + type SubBreakdowns map[string]SubBreakdown + type Token string + func (t Token) Prod() bool + func (t Token) String() string + type Webhook interface + ParseFromRequest func(req *http.Request) (*WebhookRequest, error) + ValidateSignature func(body []byte, signature string) error + func NewWebhook(token string) Webhook + func NewWebhookFromEnv() (Webhook, error) + type WebhookEnvironment string + type WebhookEvent string + type WebhookRef struct + Enabled bool + Environments []WebhookEnvironment + Events []WebhookEvent + Href string + ID string + Token string + URL string + type WebhookRefIter struct + func (i *WebhookRefIter) WebhookRef() *WebhookRef + func (it WebhookRefIter) Current() interface{} + func (it WebhookRefIter) Err() error + func (it WebhookRefIter) Next(ctx context.Context) bool + type WebhookRefRequest struct + Enabled bool + Environments []WebhookEnvironment + Events []WebhookEvent + URL string + type WebhookRefs struct + WebhookRefs []*WebhookRef + type WebhookRequest struct + Payload struct{ ... }