Versions in this module Expand all Collapse all v1 v1.1.0 Jan 27, 2020 Changes in this version type SdkToken + Referrer string v1.0.0 Jan 27, 2020 Changes in this version + const CheckResultClear + const CheckResultConsider + const CheckStatusAwaitingApplicant + const CheckStatusComplete + const CheckStatusInProgress + const CheckStatusPaused + const CheckStatusReopened + const CheckStatusWithdrawn + const CheckTypeExpress + const CheckTypeStandard + const ClientVersion + const DefaultEndpoint + const DocumentSideBack + const DocumentSideFront + const DocumentTypeBankStatement + const DocumentTypeDrivingLicense + const DocumentTypeIDCard + const DocumentTypePassport + const DocumentTypeTaxID + const DocumentTypeUKBRP + const DocumentTypeUnknown + const DocumentTypeVoterID + const ReportNameDocument + const ReportNameFacialSimilarity + const ReportNameIdentity + const ReportNameProofOfAddress + const ReportNameStreetLevel + const ReportNameWatchlist + const ReportResultClear + const ReportResultConsider + const ReportResultUnidentified + const ReportSubResultCaution + const ReportSubResultClear + const ReportSubResultRejected + const ReportSubResultSuspected + const ReportVariantKYC + const ReportVariantStandard + const ReportVariantVideo + const TokenEnv + const WebhookSignatureHeader + const WebhookTokenEnv + 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 + Addresses []Address + Country string + CountryOfBirth string + CreatedAt *time.Time + DOB string + Email string + FirstName string + Gender string + ID string + IDNumbers []IDNumber + LastName string + MiddleName string + Mobile string + MothersMaidenName string + Nationality string + PreviousLastName string + Sandbox bool + Telephone string + Title string + TownOfBirth 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 Check struct + 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 + Async bool + ChargeApplicantForCheck bool + RedirectURI string + Reports []*Report + SupressFormEmails bool + Tags []string + Type CheckType + type CheckResult string + type CheckStatus string + type CheckType string + type Checks struct + Checks []*Check + type Client struct + Endpoint string + HTTPClient HTTPRequester + Token Token + func NewClient(token string) *Client + func NewClientFromEnv() (*Client, error) + func (c *Client) CancelReport(ctx context.Context, checkID, id string) error + func (c *Client) CreateApplicant(ctx context.Context, a Applicant) (*Applicant, error) + func (c *Client) CreateCheck(ctx context.Context, applicantID string, cr CheckRequest) (*Check, error) + func (c *Client) DeleteApplicant(ctx context.Context, id string) error + func (c *Client) DownloadDocument(ctx context.Context, applicantID, id string) (*DocumentDownload, error) + func (c *Client) GetApplicant(ctx context.Context, id string) (*Applicant, error) + func (c *Client) GetCheck(ctx context.Context, applicantID, id string) (*Check, error) + func (c *Client) GetDocument(ctx context.Context, applicantID, id string) (*Document, error) + func (c *Client) GetLivePhoto(ctx context.Context, id string) (*LivePhoto, error) + func (c *Client) GetLivePhotoDownload(ctx context.Context, id string) (*DocumentDownload, error) + func (c *Client) GetReport(ctx context.Context, checkID, id string) (*Report, error) + func (c *Client) ListApplicants() *ApplicantIter + func (c *Client) ListChecks(applicantID string) *CheckIter + func (c *Client) ListDocuments(applicantID string) *DocumentIter + func (c *Client) ListLivePhotos(applicantID string) *LivePhotoIter + func (c *Client) ListReports(checkID string) *ReportIter + func (c *Client) NewSdkToken(ctx context.Context, id string) (*SdkToken, error) + func (c *Client) PickAddresses(postcode string) *PickerIter + func (c *Client) ResumeCheck(ctx context.Context, id string) (*Check, error) + func (c *Client) ResumeReport(ctx context.Context, checkID, id string) error + func (c *Client) UpdateApplicant(ctx context.Context, a Applicant) (*Applicant, error) + func (c *Client) UploadDocument(ctx context.Context, applicantID string, dr DocumentRequest, filename string) (*Document, error) + func (c *Client) UploadLivePhoto(ctx context.Context, applicantID string, file io.ReadSeeker, filename string) (*LivePhoto, error) + type Document struct + CreatedAt *time.Time + DownloadHref string + FileName string + FileSize int + FileType string + Href string + ID string + IssuingCountry string + Side DocumentSide + Type DocumentType + type DocumentDownload struct + Content []byte + Size int + func (d *DocumentDownload) Write(data []byte) (n int, err error) + 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 DocumentRequest struct + File io.ReadSeeker + IssuingCountry string + 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 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 LivePhoto struct + CreatedAt *time.Time + DownloadHref string + FileName string + FileSize int + 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 LivePhotos struct + LivePhotos []*LivePhoto + 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 Report struct + Breakdown map[string]interface{} + CreatedAt *time.Time + Documents []Document + Href string + ID string + Name ReportName + Options map[string]interface{} + Properties map[string]interface{} + Result ReportResult + Status string + SubResult ReportSubResult + Variant ReportVariant + 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 ReportVariant string + type Reports struct + Reports []*Report + type SdkToken struct + ApplicantID string + Token string + type Token string + func (t Token) Prod() bool + func (t Token) String() string + type Webhook struct + Token string + func NewWebhook(token string) *Webhook + func NewWebhookFromEnv() (*Webhook, error) + func (wh *Webhook) ParseWebhookBody(body []byte, signature string) (*WebhookRequest, error) + func (wh *Webhook) ValidateSignature(body []byte, signature string) error + type WebhookRequest struct + Payload struct{ ... }