bhr

package
v0.0.0-...-b4345f0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IRender

func IRender(e *IndividualEmployee, s *strings.Builder)

func Indent

func Indent(s *strings.Builder, level int)

func Render

func Render(emp *Employee, s *strings.Builder, level int, currentDepartment string) string

func RenderDepartment

func RenderDepartment(s *strings.Builder, level int, currentDepartment string, department string) string

Types

type Client

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

func NewClient

func NewClient(apiKey string) *Client

func (*Client) FindEmployeeByName

func (c *Client) FindEmployeeByName(name string) *Employee

func (*Client) GetDirectory

func (c *Client) GetDirectory(f FilterFunc) (dir *Directory)

func (*Client) GetEmployee

func (c *Client) GetEmployee(id int) *IndividualEmployee

func (*Client) ImageShow

func (c *Client) ImageShow(url string, s *strings.Builder) error

func (*Client) Request

func (c *Client) Request(url string) (*http.Response, error)

type Directory

type Directory struct {
	Fields    []Field    `json:"fields"`
	Employees []Employee `json:"employees"`
	// contains filtered or unexported fields
}

type DirectoryCmd

type DirectoryCmd struct {
	Client *Client
	Filters
}

func (*DirectoryCmd) Run

func (c *DirectoryCmd) Run() error

type Employee

type Employee struct {
	ID             string      `json:"id"`
	DisplayName    string      `json:"displayName"`
	FirstName      string      `json:"firstName"`
	LastName       string      `json:"lastName"`
	PreferredName  string      `json:"preferredName"`
	Gender         string      `json:"gender"`
	JobTitle       string      `json:"jobTitle"`
	WorkPhone      string      `json:"workPhone"`
	WorkEmail      string      `json:"workEmail"`
	Department     string      `json:"department"`
	Location       string      `json:"location"`
	Division       string      `json:"division"`
	LinkedIn       interface{} `json:"linkedIn"`
	Supervisor     string      `json:"supervisor"`
	PhotoUploaded  bool        `json:"photoUploaded"`
	PhotoURL       string      `json:"photoUrl"`
	CanUploadPhoto int         `json:"canUploadPhoto"`
	// contains filtered or unexported fields
}

type EmployeeCmd

type EmployeeCmd struct {
	Client *Client
	Image  bool
	EmployeeFilters
}

func (*EmployeeCmd) Run

func (c *EmployeeCmd) Run() error

type EmployeeFilters

type EmployeeFilters struct {
	Name string
	ID   int
}

type Field

type Field struct {
	ID   string `json:"id"`
	Type string `json:"type"`
	Name string `json:"name"`
}

type FilterFunc

type FilterFunc func(e Employee) bool

func Filter

func Filter(f Filters) FilterFunc

type Filters

type Filters struct {
	Department string
	Title      string
}

type IndividualEmployee

type IndividualEmployee struct {
	ID                      string      `json:"id"`
	Address1                string      `json:"address1"`
	Address2                string      `json:"address2"`
	Age                     string      `json:"age"`
	BestEmail               string      `json:"bestEmail"`
	Birthday                string      `json:"birthday"`
	City                    string      `json:"city"`
	Country                 string      `json:"country"`
	DateOfBirth             string      `json:"dateOfBirth"`
	Department              string      `json:"department"`
	Division                string      `json:"division"`
	EmployeeNumber          string      `json:"employeeNumber"`
	EmploymentHistoryStatus string      `json:"employmentHistoryStatus"`
	FirstName               string      `json:"firstName"`
	FullName1               string      `json:"fullName1"`
	FullName2               string      `json:"fullName2"`
	FullName3               string      `json:"fullName3"`
	FullName4               string      `json:"fullName4"`
	FullName5               string      `json:"fullName5"`
	DisplayName             string      `json:"displayName"`
	Gender                  interface{} `json:"gender"`
	HireDate                string      `json:"hireDate"`
	OriginalHireDate        string      `json:"originalHireDate"`
	HomeEmail               string      `json:"homeEmail"`
	HomePhone               interface{} `json:"homePhone"`
	JobTitle                string      `json:"jobTitle"`
	LastChanged             time.Time   `json:"lastChanged"`
	LastName                string      `json:"lastName"`
	Location                string      `json:"location"`
	MiddleName              interface{} `json:"middleName"`
	MobilePhone             string      `json:"mobilePhone"`
	PayChangeReason         string      `json:"payChangeReason"`
	PayRate                 string      `json:"payRate"`
	PayRateEffectiveDate    string      `json:"payRateEffectiveDate"`
	PayType                 string      `json:"payType"`
	PayPer                  string      `json:"payPer"`
	PaidPer                 string      `json:"paidPer"`
	PaySchedule             string      `json:"paySchedule"`
	PayScheduleID           string      `json:"payScheduleId"`
	PayFrequency            string      `json:"payFrequency"`
	PreferredName           string      `json:"preferredName"`
	State                   string      `json:"state"`
	StateCode               string      `json:"stateCode"`
	Supervisor              string      `json:"supervisor"`
	SupervisorID            string      `json:"supervisorId"`
	SupervisorEmail         string      `json:"supervisorEmail"`
	SupervisorEID           string      `json:"supervisorEId"`
	TerminationDate         string      `json:"terminationDate"`
	WorkEmail               string      `json:"workEmail"`
	WorkPhone               string      `json:"workPhone"`
	Zipcode                 string      `json:"zipcode"`
	IsPhotoUploaded         string      `json:"isPhotoUploaded"`
	AcaStatusCategory       interface{} `json:"acaStatusCategory"`
	Nickname                string      `json:"nickname"`
	PayPeriod               string      `json:"payPeriod"`
	PhotoUploaded           bool        `json:"photoUploaded"`
	PhotoURL                string      `json:"photoUrl"`
	Nationality             interface{} `json:"nationality"`
	EmployeeStatusDate      string      `json:"employeeStatusDate"`
}

type PercentCmd

type PercentCmd struct {
	Client *Client
	EmployeeFilters
}

func (*PercentCmd) Run

func (c *PercentCmd) Run() error

Jump to

Keyboard shortcuts

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