checkr

package module
v0.0.0-...-3207d95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

README

checkr Go Report Card GoDoc

Go bindings for the Checkr API. Inspired by outdoorsy.

Docs

You can find usage documentation on godoc.org.

Documentation

Overview

Package checkr provides a client for the checkr API.

Index

Constants

This section is empty.

Variables

View Source
var (

	// URL is the url for the specific checkr API version chosen
	URL *url.URL
)

Functions

func SetAPIKey

func SetAPIKey(key string)

SetAPIKey sets an API key.

Types

type Candidate

type Candidate struct {
	ID                          string     `json:"id,omitempty"`
	Object                      string     `json:"object,omitempty"`
	URI                         string     `json:"uri,omitempty"`
	CreatedAt                   *time.Time `json:"created_at,omitempty"`
	FirstName                   string     `json:"first_name,omitempty"`
	MiddleName                  string     `json:"middle_name,omitempty"`
	NoMiddleName                bool       `json:"no_middle_name,omitempty"`
	LastName                    string     `json:"last_name,omitempty"`
	Email                       string     `json:"email,omitempty"`
	Phone                       string     `json:"phone,omitempty"`
	Zipcode                     string     `json:"zipcode,omitempty"`
	DOB                         string     `json:"dob,omitempty"`
	SSN                         string     `json:"ssn,omitempty"`
	DriverLicenseNumber         string     `json:"driver_license_number,omitempty"`
	DriverLicenseState          string     `json:"driver_license_state,omitempty"`
	PreviousDriverLicenseNumber string     `json:"previous_driver_license_number,omitempty"`
	PreviousDriverLicenseState  string     `json:"previous_driver_license_state,omitempty"`
	CopyRequested               bool       `json:"copy_requested,omitempty"`
	CustomID                    string     `json:"custom_id,omitempty"`
	ReportIDs                   []string   `json:"report_ids,omitempty"`
	GeoIDs                      []string   `json:"geo_ids,omitempty"`
}

Candidate represents a candidate to be screened.

func (Candidate) Create

func (c Candidate) Create() error

Create sends a request to create a new Candidate.

func (*Candidate) Show

func (c *Candidate) Show() error

Show shows one candidate.

type Candidates

type Candidates struct {
	Paginator
	Data []Candidate `json:"data"`
}

Candidates represents a listing of candidates.

func (*Candidates) Index

func (c *Candidates) Index() error

Index shows the index endpoint list of Candidates.

type Invitation

type Invitation struct {
	ID            string     `json:"id,omitempty"`
	Status        string     `json:"status,omitempty"`
	URI           string     `json:"uri,omitempty"`
	InvitationURL string     `json:"invitation_url,omitempty"`
	CompletedAt   *time.Time `json:"completed_at,omitempty"`
	DeletedAt     *time.Time `json:"deleted_at,omitempty"`
	ExpiresAt     *time.Time `json:"expires_at,omitempty"`
	Package       string     `json:"package,omitempty"`
	Object        string     `json:"object,omitempty"`
	CreatedAt     *time.Time `json:"created_at,omitempty"`
	CandidateID   string     `json:"candidate_id,omitempty"`
}

Invitation represents a background check invitation. The candidate will receive an email to submit their information.

func (Invitation) Create

func (i Invitation) Create() error

Create sends an HTTP request to create a new Invitation. The Invitation attributes Package and CandidateID are required.

func (*Invitation) Show

func (i *Invitation) Show() error

Show shows one invitation.

type Invitations

type Invitations struct {
	Paginator
	Data []Invitation `json:"data"`
}

Invitations represents a listing of invitations.

func (*Invitations) Index

func (i *Invitations) Index() error

Index shows the index list of Invitations.

type Pagination

type Pagination interface {
	First() bool
	Last() bool
	Next() error
	Previous() error
	SetPage(page int)
	SetPerPage(perPage int)
	Page() int
	PerPage() int
	Total() int
	Clear()
}

Pagination describes pagination

type Paginator

type Paginator struct {
	Object       string `json:"object,omitempty"`
	NextHref     string `json:"next_href,omitempty"`
	PreviousHref string `json:"previous_href,omitempty"`
	Count        int    `json:"count,omitempty"`
	// contains filtered or unexported fields
}

Paginator represents a list of paginated results.

func (*Paginator) Clear

func (p *Paginator) Clear()

Clear clears the page and per page values. This is helpful for setting default values.

func (Paginator) First

func (p Paginator) First() bool

First checks if the current iterator is on the first page.

func (Paginator) Last

func (p Paginator) Last() bool

Last checks if the current iterator is on the last page.

func (*Paginator) Next

func (p *Paginator) Next() error

Next primes the iterator to use the next page.

func (Paginator) Page

func (p Paginator) Page() int

Page returns the current iterator page value.

func (Paginator) PerPage

func (p Paginator) PerPage() int

PerPage returns the current per page value.

func (*Paginator) Previous

func (p *Paginator) Previous() error

Previous primes the iterator to use the previous page.

func (*Paginator) SetPage

func (p *Paginator) SetPage(page int)

SetPage sets the page iterator.

func (*Paginator) SetPerPage

func (p *Paginator) SetPerPage(perPage int)

SetPerPage sets the number of results to show per page.

func (Paginator) Total

func (p Paginator) Total() int

Total returns the total number of results.

type Report

type Report struct {
	ID                       string     `json:"id,omitempty"`
	Object                   string     `json:"object,omitempty"`
	URI                      string     `json:"uri,omitempty"`
	Status                   string     `json:"status,omitempty"`
	CreatedAt                *time.Time `json:"created_at,omitempty"`
	CompletedAt              *time.Time `json:"completed_at,omitempty"`
	TurnaroundTime           int        `json:"turnaround_time,omitempty"`
	DueTime                  *time.Time `json:"due_time,omitempty"`
	Adjudication             string     `json:"adjudication,omitempty"`
	Package                  string     `json:"package,omitempty"`
	CandidateID              string     `json:"candidate_id,omitempty"`
	SsnTraceID               string     `json:"ssn_trace_id,omitempty"`
	SexOffenderSearchID      string     `json:"sex_offender_search_id,omitempty"`
	NationalCriminalSearchID string     `json:"national_criminal_search_id,omitempty"`
	CountyCriminalSearchIDs  []string   `json:"county_criminal_search_ids,omitempty"`
	MotorVehicleReportID     string     `json:"motor_vehicle_report_id,omitempty"`
	StateCriminalSearchIDs   []string   `json:"state_criminal_search_ids,omitempty"`
}

Report represents a background check report. Depending on the selected package, a report can include the following screenings: SSN trace, sex offender search, national criminal search, county criminal searches and motor vehicle report.

func (Report) Create

func (r Report) Create() error

Create sends a request to create a new Report.

func (*Report) Show

func (r *Report) Show() error

Show shows one report.

type Subscription

type Subscription struct {
	ID            string    `json:"id,omitempty"`
	Object        string    `json:"object,omitempty"`
	URI           string    `json:"uri,omitempty"`
	Status        string    `json:"status,omitempty"`
	CreatedAt     time.Time `json:"created_at,omitempty"`
	CanceledAt    time.Time `json:"canceled_at,omitempty"`
	Package       string    `json:"package,omitempty"`
	IntervalCount int       `json:"interval_count,omitempty"`
	IntervalUnit  string    `json:"interval_unit,omitempty"`
	StartDate     string    `json:"start_date,omitempty"`
	CandidateID   string    `json:"candidate_id,omitempty"`
}

Subscription represents a background check subscription.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL