Documentation
¶
Index ¶
- func Int(i int) *int
- func String(v string) *string
- type ClientDay
- type ClientDeleteWorkOrderEntry
- type ClientOtherHours
- type ClientOtherHoursRequest
- type ClientPunch
- type ClientPunchRequest
- type ClientTRC
- type ClientWorkOrder
- type ClientWorkOrderEntry
- type DeletePunch
- type DeleteWorkOrderEntry
- type ElapsedTimeDay
- type ElapsedTimeEntry
- type ElapsedTimeEntryWrapper
- type ElapsedTimeSummary
- type Employee
- type EmployeeCache
- type EmployeeJob
- type EmployeeRecord
- type Job
- type LunchPunch
- type Punch
- type ServerErrorMessage
- type ServerLoginErrorMessage
- type TRC
- type TimeClockDay
- type Timesheet
- type TotalTime
- type WebSocketMessage
- type WorkOrder
- type WorkOrderDaySummary
- type WorkOrderEntry
- type WorkOrderUpsert
- type YTimeLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientDay ¶
type ClientDay struct {
Date time.Time `json:"date"`
HasPunchException *bool `json:"has-punch-exception,omitempty"`
HasWorkOrderException *bool `json:"has-work-order-exception,omitempty"`
Punches []ClientPunch `json:"punches"`
PunchedHours string `json:"punched-hours"`
ReportedHours string `json:"reported-hours"`
PhysicalFacilitiesHours string `json:"physical-facilities-hours"`
WorkOrderEntries []ClientWorkOrderEntry `json:"work-order-entries"`
SickHoursYTD string `json:"sick-hours-ytd"`
VacationHoursYTD string `json:"vacation-hours-ytd"`
OtherHours []ClientOtherHours `json:"other-hours"`
}
ClientDay is the day structure sent to the client
type ClientDeleteWorkOrderEntry ¶
type ClientDeleteWorkOrderEntry struct {
JobID int `json:"employee-job-id"`
Date string `json:"date"`
SequenceNumber int `json:"sequence-number"`
}
ClientDeleteWorkOrderEntry .
type ClientOtherHours ¶
type ClientOtherHours struct {
Editable bool `json:"editable"`
SequenceNumber int `json:"sequence-number"`
TimeReportingCodeHours string `json:"time-reporting-code-hours"`
TRC ClientTRC `json:"trc"`
}
ClientOtherHours .
type ClientOtherHoursRequest ¶
type ClientOtherHoursRequest struct {
EmployeeJobID int `json:"employee-job-id"`
SequenceNumber int `json:"sequence-number"`
TimeReportingCodeHours string `json:"time-reporting-code-hours"`
TRCID string `json:"trc-id"`
PunchDate time.Time `json:"punch-date"`
}
ClientOtherHoursRequest is used to post and put the vacation and sick hours
type ClientPunch ¶
type ClientPunch struct {
ID int `json:"id"`
EmployeeJobID int `json:"employee-job-id"`
Time time.Time `json:"time"`
PunchType string `json:"type"`
DeletablePair *int `json:"deletable-pair,omitempty"`
}
ClientPunch is the punch structure sent to the client
type ClientPunchRequest ¶
type ClientPunchRequest struct {
BYUID string `json:"byu-id"`
EmployeeJobID *int `json:"employee-job-id"`
Time time.Time `json:"time"`
PunchType string `json:"type"`
WorkOrderID *string `json:"work-order-id,omitempty"`
TRCID *string `json:"trc-id,omitempty"`
SequenceNumber *int `json:"sequence-number"`
}
ClientPunchRequest is the punch structure from the client on a punch in or out
type ClientWorkOrder ¶
ClientWorkOrder is the work order structure sent to the client
type ClientWorkOrderEntry ¶
type ClientWorkOrderEntry struct {
ID int `json:"id"`
WorkOrder ClientWorkOrder `json:"work-order"`
TimeReportingCodeHours string `json:"time-reporting-code-hours"`
TRC ClientTRC `json:"trc"`
Editable bool `json:"editable"`
}
ClientWorkOrderEntry is a work order entry sent to the client
type DeletePunch ¶
type DeletePunch struct {
EmployeeJobID *int `json:"employee-record"`
SequenceNumber *int `json:"sequence-number"`
PunchTime time.Time `json:"punch-time"`
}
DeletePunch .
type DeleteWorkOrderEntry ¶
type DeleteWorkOrderEntry struct {
JobID int `json:"employee-job-id"`
Date string `json:"date"`
SequenceNumber int `json:"sequence-number"`
}
DeleteWorkOrderEntry .
type ElapsedTimeDay ¶
type ElapsedTimeDay struct {
PunchDate string `json:"punch_date"`
ElapsedTimeEntries []ElapsedTimeEntry `json:"punches"`
}
ElapsedTimeDay is the parent structure for sick and vacation hours for a day
type ElapsedTimeEntry ¶
type ElapsedTimeEntry struct {
//these only come back when GETTING
Editable *bool `json:"editable,omitempty"`
TRC TRC `json:"trc"`
//these come back for GET and are used on POST
TimeReportingCodeHours string `json:"time_reporting_code_hours"`
SequenceNumber int `json:"sequence_number"`
EmployeeRecord int `json:"employee_record"`
//POST only
PunchDate string `json:"punch_date"`
TRCID string `json:"trc_id"`
TimeCollectionSource string `json:"time_collection_source"`
}
ElapsedTimeEntry is the structure for a single amount of sick or vacation time
type ElapsedTimeEntryWrapper ¶
type ElapsedTimeEntryWrapper struct {
ElapsedTimeEntry ElapsedTimeEntry `json:"elapsed_time_entry"`
}
ElapsedTimeEntryWrapper is th structure to use when POSTING sick or vacation
type ElapsedTimeSummary ¶
type ElapsedTimeSummary struct {
SickLeaveBalanceHours string `json:"sick_leave_balance_hours"`
VacationLeaveBalanceHours string `json:"vacation_leave_balance_hours"`
Dates []ElapsedTimeDay `json:"elapsed_time_dates"`
}
ElapsedTimeSummary is the parent structure for sick and vacation hours
type Employee ¶
type Employee struct {
ID string `json:"id"`
Name string `json:"name"`
Jobs []EmployeeJob `json:"jobs"`
TotalTime TotalTime `json:"total-time"`
Message string `json:"international-message"`
}
Employee is all of the information about an employee for their timeclock session
type EmployeeCache ¶
type EmployeeCache struct {
Employees []EmployeeRecord `json:"employees"`
}
EmployeeCache is the cache list
type EmployeeJob ¶
type EmployeeJob struct {
EmployeeJobID int `json:"employee-job-id"`
Description string `json:"description"`
TimeSubtotals TotalTime `json:"time-subtotals"`
ClockStatus string `json:"clock-status"`
JobType string `json:"job-type"`
IsPhysicalFacilities *bool `json:"is-physical-facilities,omitempty"`
HasPunchException *bool `json:"has-punch-exception,omitempty"`
HasWorkOrderException *bool `json:"has-work-order-exception,omitempty"`
OperatingUnit string `json:"operating_unit"`
TRCs []ClientTRC `json:"trcs"`
CurrentTRC ClientTRC `json:"current-trc"`
CurrentWorkOrder ClientWorkOrder `json:"current-work-order"`
WorkOrders []ClientWorkOrder `json:"work-orders"`
Days []ClientDay `json:"days"`
}
EmployeeJob is a job for an employee - sent to the client
type EmployeeRecord ¶
type EmployeeRecord struct {
BYUID string `json:"byu_id"`
NETID string `json:"net_id"`
Jobs []Job `json:"jobs"`
Name string `json:"sort_name"`
}
EmployeeRecord comes back in the cache list
type Job ¶
type Job struct {
JobCodeDesc string `json:"job_code_description"`
PunchType string `json:"punch_type"`
EmployeeRecord int `json:"employee_record"`
WeeklySubtotal string `json:"weekly_subtotal"`
PeriodSubtotal string `json:"period_subtotal"`
PhysicalFacilities *bool `json:"physical_facilities,omitempty"`
OperatingUnit string `json:"operating_unit"`
TRCs []TRC `json:"trcs"`
CurrentWorkOrder WorkOrder `json:"current_work_order"`
CurrentTRC TRC `json:"current_trc"`
FullPartTime string `json:"full_part_time"`
HasPunchException *bool `json:"has_punch_exception,omitempty"`
HasWorkOrderException *bool `json:"has_work_order_exception,omitempty"`
}
Job represents the current state of an employee's job
func (*Job) UnmarshalJSON ¶
type LunchPunch ¶
type LunchPunch struct {
// required from client
EmployeeJobID *int `json:"employee_record,omitempty"`
StartTime time.Time `json:"start_time"`
Duration *string `json:"duration,omitempty"`
// added by server
PunchZone *string `json:"punch_zone,omitempty"`
TimeCollectionSource string `json:"time_collection_source"`
LocationDescription string `json:"location_description"`
}
LunchPunch send us for lunch punch
type Punch ¶
type Punch struct {
PunchType string `json:"punch_type"`
PunchTime string `json:"punch_time"`
SequenceNumber *int `json:"sequence_number,omitempty"`
DeletablePair *int `json:"deletable_pair,omitempty"`
Latitude *string `json:"latitude,omitempty"`
Longitude *string `json:"longitude,omitempty"`
LocationDescription *string `json:"location_description,omitempty"`
TimeCollectionSource *string `json:"time_collection_source,omitempty"`
WorkOrderID *string `json:"work_order_id,omitempty"`
TRCID *string `json:"trc_id,omitempty"`
PunchDate *string `json:"punch_date,omitempty"`
EmployeeRecord *int `json:"employee_record,omitempty"`
PunchZone *string `json:"punch_zone,omitempty"`
InternetAddress *string `json:"internet_address,omitempty"`
}
Punch represents a single punch in or out for an employee
type ServerErrorMessage ¶
type ServerErrorMessage struct {
Message string `json:"message"`
}
ServerErrorMessage .
type ServerLoginErrorMessage ¶
type ServerLoginErrorMessage struct {
Status struct {
Code string `json:"code"`
Message string `json:"message"`
}
}
ServerLoginErrorMessage .
type TimeClockDay ¶
type TimeClockDay struct {
Date string `json:"date"`
HasPunchException *bool `json:"has_punch_exception,omitempty"`
HasWorkOrderException *bool `json:"has_work_order_exception,omitempty"`
Punches []Punch `json:"punches"`
PunchedHours string `json:"punched_hours"`
}
TimeClockDay represents a day with activity on the clock
type Timesheet ¶
type Timesheet struct {
//BYUID is the byu id
BYUID string `json:"byu_id"`
//PersonName is the person's name in Last, First format
PersonName string `json:"person_name"`
//WeeklyTotal is the total hours worked so far in the week in format h:mm (string)
WeeklyTotal string `json:"weekly_total"`
//PeriodTotal is the total hours worked so far in the pay period in format h:mm (string)
PeriodTotal string `json:"period_total"`
//Jobs is the array containing current clock intformation about each job
Jobs []Job `json:"jobs"`
//InternationalMessage is used to indicate that a warning should be shown to the user due to hour working limits
InternationalMessage string `json:"international_message"`
// International is going away in a new version of the api
International bool `json:"international"`
}
Timesheet gives all data about the current clock state for an employee and his/her jobs
type WebSocketMessage ¶
type WebSocketMessage struct {
Key string `json:"key"`
Value interface{} `json:"value"`
}
WebSocketMessage is a wrapper for whatever we're sending down the websocket
type WorkOrder ¶
type WorkOrder struct {
WorkOrderID string `json:"work_order_id"`
WorkOrderDescription string `json:"work_order_description"`
}
WorkOrder is ID and description for a work order
type WorkOrderDaySummary ¶
type WorkOrderDaySummary struct {
Date string `json:"punch_date"`
WorkOrderEntries []WorkOrderEntry `json:"work_order_entries"`
ReportedHours string `json:"reported_hours"`
PhysicalFacilitiesHours string `json:"physical_facilities_hours"`
OtherHours string `json:"other_hours"`
HasPunchException *bool `json:"has_punch_exception,omitempty"`
HasWorkOrderException *bool `json:"has_work_order_exception,omitempty"`
}
WorkOrderDaySummary is returned when querying a date for work orders logged on that date
type WorkOrderEntry ¶
type WorkOrderEntry struct {
WorkOrder WorkOrder `json:"work_order"`
TRC TRC `json:"trc"`
TimeReportingCodeHours string `json:"time_reporting_code_hours"`
SequenceNumber int `json:"sequence_number"`
Editable bool `json:"editable"`
//these only used when posting
EmployeeRecord int `json:"employee_record"`
}
WorkOrderEntry represents a single work order logged for part of a day
type WorkOrderUpsert ¶
type WorkOrderUpsert struct {
EmployeeJobID *int `json:"employee_record"`
SequenceNumber *int `json:"sequence_number"`
TimeReportingCodeHours string `json:"time_reporting_code_hours"`
PunchDate time.Time `json:"punch_date"`
TRCID string `json:"trc_id"`
WorkOrderID *string `json:"work_order_id"`
// set on the backend
TimeCollectionSource string `json:"time_collection_source"`
}
WorkOrderUpsert .
func (WorkOrderUpsert) MarshalJSON ¶
func (w WorkOrderUpsert) MarshalJSON() ([]byte, error)
MarshalJSON .
type YTimeLocation ¶
type YTimeLocation struct {
YtimeLocation string `json:"ytime_location"`
UpdatedByName string `json:"updated_by_name"`
LocationSource string `json:"location_source"`
YtimeLocationCode string `json:"ytime_location_code"`
UpdatedDatetime interface{} `json:"updated_datetime"`
Latitude float64 `json:"latitude"`
YtimeLocationAbbreviation string `json:"ytime_location_abbreviation"`
Status string `json:"status"`
Longitude float64 `json:"longitude"`
}
YTimeLocation .