talentio

package
v0.0.0-...-9ff66fb Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOngoing      = "ongoing"
	StatusReject       = "reject"
	StatusFail         = "fail"
	StatusPass         = "pass"
	StatusPoolActive   = "poolActive"
	StatusPoolInactive = "poolInactive"
)

Common statuses of candidate.

View Source
const (
	TypeContact   = "contact"
	TypeResume    = "resume"
	TypeInterview = "interview"
)

Common types of the state between candidate and recruiter.

View Source
const (
	SortRegisteredAtAscKey  = "registeredAt"
	SortRegisteredAtDescKey = "-registeredAt"
)

Sorting keys.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int value to store v and returns a pointer to it.

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

Types

type AmbiguousTime

type AmbiguousTime struct {
	Raw interface{}
}

func (AmbiguousTime) After

func (t AmbiguousTime) After(u time.Time) bool

func (AmbiguousTime) Before

func (t AmbiguousTime) Before(u time.Time) bool

func (AmbiguousTime) Time

func (t AmbiguousTime) Time() time.Time

type Candidate

type Candidate struct {
	ID               int         `json:"id"`
	FirstName        string      `json:"firstName"`
	LastName         string      `json:"lastName"`
	Email            string      `json:"email"`
	Description      string      `json:"description"`
	FixedAt          time.Time   `json:"fixedAt"`
	RegisteredAt     time.Time   `json:"registeredAt"`
	Status           string      `json:"status"`
	Priority         int         `json:"priority"`
	ChannelType      string      `json:"channelType"`
	ChannelName      string      `json:"channelName"`
	Stages           []Stage     `json:"stages"`
	ReferrerEmployee Employee    `json:"referrerEmployee,omitempty"`
	AgentCompany     Company     `json:"agentCompany,omitempty"`
	Requisition      Requisition `json:"requisition"`
	Tags             []Tag       `json:"tags"`
}

Candidate represents candidate resources.

type CandidatesListOptions

type CandidatesListOptions struct {
	Page   int    `url:"page"`
	Status string `url:"status"`
	Sort   string `url:"sort"`
}

CandidatesListOptions represents an order to a related resource.

type CandidatesService

type CandidatesService service

CandidatesService handles communication with the candidates related methods of the Talentio API.

func (CandidatesService) Get

func (s CandidatesService) Get(id int) (*Candidate, *Response, error)

Get returns a new Candidate.

func (CandidatesService) List

List returns a slice of Candidate.

type Client

type Client struct {
	Candidates *CandidatesService
	// contains filtered or unexported fields
}

A Client manages communication with the Talentio API.

func NewClient

func NewClient(config *Config) *Client

NewClient returns a new Talentio client. If a nil Config is provided, defaultConfig will be used.

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) (*Response, error)

Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred.

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body io.Reader) (*http.Request, error)

NewRequest returns a new API Request given a method, URL, and optional body. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash.

type Company

type Company struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Company represents company resources.

type Config

type Config struct {
	// contains filtered or unexported fields
}

A Config provides service configuration for service.

func NewConfig

func NewConfig() *Config

NewConfig returns a pointer of new Config objects.

func (*Config) WithAccessToken

func (c *Config) WithAccessToken(token string) *Config

WithAccessToken sets a access token value to verify service returning a Config pointer for chaining.

func (*Config) WithHTTPClient

func (c *Config) WithHTTPClient(client *http.Client) *Config

WithHTTPClient sets a config HTTPClient value returning a Config pointer for chaining.

type Employee

type Employee struct {
	ID        int    `json:"id"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
	Email     string `json:"email"`
	Active    bool   `json:"active"`
}

Employee represents employee resources.

type Evaluation

type Evaluation struct {
	ID       int      `json:"id"`
	Finished bool     `json:"finished"`
	Items    []Item   `json:"items"`
	Employee Employee `json:"employee"`
}

Evaluation represents evaluation resources.

type Item

type Item struct {
	Name string `json:"name"`
	Type string `json:"type"`
	// Input   bool   `json:"input"`
	Comment string `json:"comment"`
}

Item represents item resources.

type Requisition

type Requisition struct {
	ID     int    `json:"id"`
	Name   string `json:"name"`
	Active bool   `json:"active"`
}

Requisition represents requisition resources.

type Response

type Response struct {
	*http.Response

	Remaining int
	Reset     int
	Total     int
}

Response is a Talentio API response. This wraps the standard http.Response returned from Talentio and provides convenient access to things.

type Stage

type Stage struct {
	ID          int          `json:"id"`
	Type        string       `json:"type"`
	Step        int          `json:"step"`
	Status      string       `json:"status"`
	ScheduledAt interface{}  `json:"scheduledAt,omitempty"` // boolean or time.Time (ambiguous)
	Description string       `json:"description,omitempty"`
	Evaluations []Evaluation `json:"evaluations,omitempty"`
}

Stage represents stage resources.

type Tag

type Tag struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Tag represents tag resources.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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