Documentation
¶
Index ¶
- Variables
- type APIError
- type Address
- type Applicant
- type Callback
- type CallbackPayload
- type Check
- type CheckRequest
- type Client
- func (c *Client) CreateApplicant(a *Applicant) (*Applicant, error)
- func (c *Client) CreateCheck(appID string, cr *CheckRequest) (*Check, error)
- func (c *Client) GetDocuments(appID string) ([]Document, error)
- func (c *Client) GetFile(url string) (b []byte, err error)
- func (c *Client) GetLivePhotos(appID string) ([]LivePhoto, error)
- func (c *Client) ReadApplicant(id string) (*Applicant, error)
- func (c *Client) ReadApplicants() ([]*Applicant, error)
- func (c *Client) ReadCheck(appID, checkID string) (*Check, error)
- func (c *Client) ReadChecks(appID string) ([]*Check, error)
- func (c *Client) ReadReport(url string) (*Report, error)
- func (c *Client) SDKToken(appID, referrer string) (SDKToken, error)
- func (c *Client) UnmarshalEvent(r *http.Request) (*Event, error)
- type Date
- type Document
- type Event
- type EventTime
- type IDNumber
- type LivePhoto
- type Object
- type Report
- type ReportRequest
- type SDKToken
Constants ¶
This section is empty.
Variables ¶
View Source
var CheckType = struct { Express string Standard string }{ Express: "express", Standard: "standard", }
View Source
var (
ErrBadSignature = newError("webhook signature validation failed")
)
View Source
var EventType = struct { Completion string Withdrawal string InProgress string }{ Completion: "completion", Withdrawal: "withdrawal", InProgress: "in_progress", }
View Source
var IDNumberType = struct { Nino string SSN string DrivingLicense string }{ Nino: "nino", SSN: "ssn", DrivingLicense: "driving_license", }
View Source
var ReportStatus = struct { Pending string Complete string }{ Pending: "pending", Complete: "complete", }
View Source
var ReportType = struct { GBR struct { Identity string Document string Employment string Education string NegativeMedia string Directorship string CriminalHistory string Watchlist string AntiMoneyLaundering string StreetLevel string } USA struct { Identity string Document string SexOffender string Watchlist string NationalCriminal string Eviction string CountyCriminal string DrivingRecord string } Europe struct { Identity string Document string CriminalHistory string } }{ GBR: struct { Identity string Document string Employment string Education string NegativeMedia string Directorship string CriminalHistory string Watchlist string AntiMoneyLaundering string StreetLevel string }{ Identity: "identity", Document: "document", Employment: "employment", Education: "education", NegativeMedia: "negative_media", Directorship: "directorship", CriminalHistory: "criminal_history", Watchlist: "watchlist", AntiMoneyLaundering: "anti_money_laundering", StreetLevel: "street_level", }, USA: struct { Identity string Document string SexOffender string Watchlist string NationalCriminal string Eviction string CountyCriminal string DrivingRecord string }{ Identity: "identity", Document: "document", SexOffender: "sex_offender", Watchlist: "watchlist", NationalCriminal: "national_criminal", Eviction: "eviction", CountyCriminal: "county_criminal", DrivingRecord: "driving_record", }, Europe: struct { Identity string Document string CriminalHistory string }{ Identity: "identity", Document: "document", CriminalHistory: "criminal_history", }, }
View Source
var ResourceType = struct { Report string Check string }{ Report: "report", Check: "check", }
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type Address ¶
type Address struct {
BuildingName string `json:"building_name,omitempty"`
BuildingNumber string `json:"building_number,omitempty"`
FlatNumber string `json:"flat_number,omitempty"`
Street string `json:"street"`
SubStreet string `json:"sub_street,omitempty"`
Town string `json:"town"`
State string `json:"state,omitempty"`
Postcode string `json:"postcode"`
Country string `json:"country"`
StartDate *Date `json:"start_date"`
EndDate *Date `json:"end_date,omitempty"`
}
type Applicant ¶
type Applicant struct {
ID string `json:"id,omitempty"`
Title string `json:"title,omitempty"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
MiddleName string `json:"middle_name,omitempty"`
Email string `json:"email,omitempty"`
Gender string `json:"gender,omitempty"`
Dob *Date `json:"dob,omitempty"`
Country string `json:"country,omitempty"`
Mobile string `json:"mobile,omitempty"`
Telephone string `json:"telephone,omitempty"`
IDNumbers []IDNumber `json:"id_numbers,omitempty"`
Addresses []Address `json:"addresses,omitempty"`
Href string `json:"href,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
}
type Callback ¶
type Callback struct {
Payload CallbackPayload `json:"payload"`
}
type CallbackPayload ¶
type Check ¶
type Check struct {
ID string `json:"id"`
Result string `json:"result"`
Status string `json:"status"`
Type string `json:"type"`
Href string `json:"href"`
Reports []*Report `json:"reports"`
CreatedAt time.Time `json:"created_at"`
}
func (*Check) ReportForName ¶
type CheckRequest ¶
type CheckRequest struct {
Type string `json:"type"`
Reports []ReportRequest `json:"reports"`
Tags []string `json:"tags"`
}
func NewCheckRequest ¶
func NewCheckRequest(checkType string, reports ...string) *CheckRequest
type Client ¶
type Client struct {
WebhookToken string
// contains filtered or unexported fields
}
Client provides methods for interacting with the onfido API
func (*Client) CreateCheck ¶
func (c *Client) CreateCheck(appID string, cr *CheckRequest) (*Check, error)
func (*Client) ReadApplicants ¶
type EventTime ¶
func (*EventTime) UnmarshalJSON ¶
type Report ¶
type Report struct {
ID string `json:"id"`
Href string `json:"href"`
Name string `json:"name"`
Result string `json:"result"`
Status string `json:"status"`
Breakdown map[string]interface{} `json:"breakdown"`
Properties map[string]interface{} `json:"properties"`
CreatedAt time.Time `json:"created_at"`
}
type ReportRequest ¶
type ReportRequest struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.