Documentation ¶
Index ¶
- Variables
- type Accident
- type Candidate
- type Client
- func (c Client) CandidateCreate(can *Candidate) error
- func (c Client) CandidateRetrieve(id string) (*Candidate, error)
- func (c Client) CandidatesListAll() ([]*Candidate, error)
- func (c Client) MVRRetrieve(id string) (*MVRScreening, error)
- func (c Client) ReportCreate(candidateID string, pkg string) (*Report, error)
- func (c Client) ReportRetrieve(id string) (*Report, error)
- func (c Client) UploadDocument(candidateID, documentType, filename, mimeType string, body io.Reader) (*Document, error)
- type Document
- type MVRScreening
- type Report
- type ShortDate
- type Timestamp
- type Verification
- type Violation
- type Webhook
Constants ¶
This section is empty.
Variables ¶
var (
ErrBadSignature = newError("webhook signature validation failed")
)
var Key string
var ReportPackages = struct { TaskerStandard string TaskerPro string DriverStandard string DriverPro string }{ TaskerStandard: "tasker_standard", TaskerPro: "tasker_pro", DriverStandard: "driver_standard", DriverPro: "driver_pro", }
var ReportStatus = struct { Pending string Clear string Consider string Suspended string Dispute string }{ Pending: "pending", Clear: "clear", Consider: "consider", Suspended: "suspended", Dispute: "dispute", }
var ScreeningStatus = struct { Pending string Clear string Consider string }{ Pending: "pending", Clear: "clear", Consider: "consider", }
var WebhookType = struct { Report struct { Created string Upgraded string Completed string Suspended string Resumed string } Candidate struct { PreAdverseAction string PostAdverseAction string Engaged string DriverLicenseRequired string IDRequired string } }{ Report: struct { Created string Upgraded string Completed string Suspended string Resumed string }{ Created: "report.created", Upgraded: "report.upgraded", Completed: "report.completed", Suspended: "report.suspended", Resumed: "report.resumed", }, Candidate: struct { PreAdverseAction string PostAdverseAction string Engaged string DriverLicenseRequired string IDRequired string }{ PreAdverseAction: "candidate.pre_adverse_action", PostAdverseAction: "candidate.post_adverse_action", Engaged: "candidate.engaged", DriverLicenseRequired: "candidate.driver_license_required", IDRequired: "candidate.id_required", }, }
Functions ¶
This section is empty.
Types ¶
type Accident ¶
type Accident struct { AccidentDate ShortDate `json:"accident_date"` Description string `json:"description"` City string `json:"city"` County string `json:"county"` State string `json:"state"` OrderNumber string `json:"order_number"` Points string `json:"points"` VehicleSpeed string `json:"vehicle_speed"` ReinstatementDate string `json:"reinstatement_date"` ActionTaken string `json:"action_taken"` TicketNumber string `json:"ticket_number"` EnforcingAgency string `json:"enforcing_agency"` Jurisdiction string `json:"jurisdiction"` Severity string `json:"severity"` ViolationNumber string `json:"violation_number"` LicensePlate string `json:"license_plate"` FineAmount string `json:"fine_amount"` StateCode string `json:"state_code"` AcdCode string `json:"acd_code"` InjuryAccident bool `json:"injury_accident"` FatalityAccident bool `json:"fatality_accident"` FatalityCount int `json:"fatality_count"` InjuryCount int `json:"injury_count"` VehiclesInvolvedCount int `json:"vehicles_involved_count"` ReportNumber string `json:"report_number"` PolicyNumber string `json:"policy_number"` }
type Candidate ¶
type Candidate struct { // Generated by Checkr ID string `json:"id,omitempty"` Object string `json:"object,omitempty"` URI string `json:"uri,omitempty"` CreatedAt Timestamp `json:"created_at,omitempty"` // Sent to create new Candidate FirstName string `json:"first_name"` MiddleName string `json:"middle_name,omitempty"` NoMiddleName bool `json:"no_middle_name"` LastName string `json:"last_name"` Email string `json:"email"` Phone string `json:"phone"` Zipcode string `json:"zipcode,omitempty"` DOB ShortDate `json:"dob,omitempty"` BirthCountry string `json:"birth_country,omitempty"` SSN string `json:"ssn,omitempty"` DriverLicenseNumber string `json:"driver_license_number,omitempty"` DriverLicenseState string `json:"driver_license_state,omitempty"` DriverLicenseProvince string `json:"driver_license_province,omitempty"` PreviousDriverLicenseNumber string `json:"previous_driver_license_number,omitempty"` PreviousDriverLicenseState string `json:"previous_driver_license_state,omitempty"` CopyRequested bool `json:"copy_requested,omitempty"` Adjudication string `json:"adjudication,omitempty"` CustomID string `json:"custom_id,omitempty"` ReportIDs []string `json:"report_ids,omitempty"` GeoIDs []string `json:"geo_ids,omitempty"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewClient initializes a new client for the requested country. This function must be used to create a Client object. Global Key variable must be set before calling this function.
func (Client) CandidateCreate ¶
Create creates a new Candidate object in Checkr. Populate the appropriate fields in your candidate object before making the request. Fields generated by Checkr will be populated after the response.
func (Client) CandidateRetrieve ¶
Retrieve retrieves a Candidate by ID.
func (Client) CandidatesListAll ¶
func (Client) MVRRetrieve ¶
func (c Client) MVRRetrieve(id string) (*MVRScreening, error)
func (Client) ReportCreate ¶
Create creates a new Report object in Checkr. Populate the appropriate fields in your candidate object before making the request. Fields generated by Checkr will be populated after the response.
type MVRScreening ¶
type MVRScreening struct { FullName string `json:"full_name"` LicenseNumber string `json:"license_number"` LicenseState string `json:"license_state"` LicenseStatus string `json:"license_status"` LicenseType string `json:"license_type"` LicenseClass string `json:"license_class"` ExpirationDate ShortDate `json:"expiration_date"` IssuedDate ShortDate `json:"issued_date"` FirstIssuedDate ShortDate `json:"first_issued_date"` InferredIssuedDate ShortDate `json:"inferred_issued_date"` Restrictions []string `json:"restrictions"` Accidents []Accident `json:"accidents"` Violations []Violation `json:"violations"` // contains filtered or unexported fields }
type Report ¶
type Report struct { ID string `json:"id"` Object string `json:"object"` URI string `json:"uri"` Status string `json:"status"` CreatedAt Timestamp `json:"created_at"` CompletedAt Timestamp `json:"completed_at"` TurnaroundTime int `json:"turnaround_time"` Package string `json:"package"` CandidateID string `json:"candidate_id"` SSNTraceID string `json:"ssn_trace_id"` SexOffenderSearchID string `json:"sex_offender_search_id"` NationalCriminalSearchID string `json:"national_criminal_search_id"` CountyCriminalSearchIds []string `json:"county_criminal_search_ids"` MotorVehicleReportID string `json:"motor_vehicle_report_id"` // contains filtered or unexported fields }
func (*Report) GetVerificationLinks ¶
func (r *Report) GetVerificationLinks() (Verification, error)
type ShortDate ¶
ShortDate wraps time.Time and handles custom marshalling in the shortDateFormat format.
func (ShortDate) MarshalJSON ¶
func (*ShortDate) UnmarshalJSON ¶
type Timestamp ¶
Timestamp wraps time.Time and handles custom marshalling in the timestampFormat format.
func (Timestamp) MarshalJSON ¶
func (*Timestamp) UnmarshalJSON ¶
type Verification ¶
type Verification struct { Object string `json:"object"` Count int `json:"count"` Data []struct { CompletedAt Timestamp `json:"completed_at"` CreatedAt string `json:"created_at"` ID string `json:"id"` Object string `json:"object"` URI string `json:"uri"` VerificationType string `json:"verification_type"` VerificationURL string `json:"verification_url"` } `json:"data"` }
type Violation ¶
type Violation struct { Type string `json:"type"` IssuedDate string `json:"issued_date"` ConvictionDate string `json:"conviction_date"` Description string `json:"description"` Points int `json:"points"` City string `json:"city"` County string `json:"county"` State string `json:"state"` TicketNumber string `json:"ticket_number"` Disposition string `json:"disposition"` Category string `json:"category"` CourtName string `json:"court_name"` AcdCode string `json:"acd_code"` StateCode string `json:"state_code"` Docket string `json:"docket"` }
type Webhook ¶
type Webhook struct { ID string `json:"id"` Object string `json:"object"` Type string `json:"type"` CreatedAt Timestamp `json:"created_at"` Data struct { Object json.RawMessage `json:"object"` } `json:"data"` }
func NewWebhook ¶
NewWebhook reads the body of the request and verifies the webhook signature.