Documentation
¶
Index ¶
Constants ¶
View Source
const BambooDateLayout = "2006-01-02"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// APIKey see https://documentation.bamboohr.com/docs#section-authentication
APIKey string `validate:"required"`
// Subdomain is BambooHR customer identifier
// If you access BambooHR at https://mycompany.bamboohr.com, then the subdomain is "mycompany"
Subdomain string `validate:"required"`
// Base is API URL, nil for default
BaseURL *url.URL
}
Auth is API server auth parameters
type Employee ¶
type Employee struct {
ID json.Number `json:"bamboo_id" mapstructure:"id"`
Email string `json:"id" mapstructure:"workEmail"`
Department string `json:"department" mapstructure:"department"`
Divison string `json:"division" mapstructure:"division"`
Status string `json:"status" mapstructure:"status"`
FirstName string `json:"first_name" mapstructure:"firstName"`
LastName string `json:"last_name" mapstructure:"lastName"`
Country string `json:"country" mapstructure:"country"`
State string `json:"state" mapstructure:"state"`
}
Employee represents BambooHR employee record
func GetAllEmployees ¶
func GetAllEmployees(ctx context.Context, client *http.Client, param EmployeeRequest) ([]Employee, error)
GetAllEmployees returns full list of employees in active status
func GetAvailableEmployees ¶
func GetAvailableEmployees(ctx context.Context, client *http.Client, param EmployeeRequest) ([]Employee, error)
GetAvailableEmployees only returns employees that are marked as active and are not on vacation or absense leave
type EmployeeRequest ¶
EmployeeRequest requests employees
func (EmployeeRequest) RequestURL ¶
func (req EmployeeRequest) RequestURL() *url.URL
type WhoIsOutRequest ¶
type WhoIsOutRequest struct {
Auth
// Location is required as BambooHR only returns date, and it must be converted into timestamp
// Timezone is an installation specific setting that does not seem to be available via API
// but may only be accessed from the BambooHR Admin UI
Location *time.Location
Start, End time.Time
}
func (WhoIsOutRequest) RequestURL ¶
func (req WhoIsOutRequest) RequestURL() *url.URL
Click to show internal directories.
Click to hide internal directories.