Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIPages ¶
type APIPages struct { Count int `json:"count"` NextURL string `json:"next"` PrevURL string `json:"previous"` }
APIPages is a struct representation of a API page response from tock
type ReportingPeriod ¶
type ReportingPeriod struct { StartDate string `json:"start_date"` EndDate string `json:"end_date"` ExactWorkingHours int `json:"exact_working_hours"` MinWorkingHours int `json:"min_working_hours"` MaxWorkingHours int `json:"max_working_hours"` }
ReportingPeriod is a struct representation of the reporting_period JSON object from tock
type ReportingPeriodAuditDetails ¶
ReportingPeriodAuditDetails is a struct representation of an API response from the Reporting Period Audit details endpoint
type ReportingPeriodAuditList ¶
type ReportingPeriodAuditList struct { APIPages ReportingPeriods []ReportingPeriod }
ReportingPeriodAuditList is a struct representation of an API response from the Reporting Period Audit list endpoint
type Tock ¶
type Tock struct { // Get Audit endpoint TockURL string UserTockURL string AuditEndpoint string DataFetcher *helpers.DataFetcher }
Tock struct contains the audit endpoint and methods associated with Tock
func (*Tock) FetchTockUsers ¶
func (tock *Tock) FetchTockUsers(endpoint string) *ReportingPeriodAuditDetails
FetchTockUsers is a function for collecting all the users who have not filled out thier time sheet for the current period
func (*Tock) TockUserGen ¶
func (tock *Tock) TockUserGen() func() *ReportingPeriodAuditDetails
TockUserGen returns a generator that returns a steram of user data by paging through the api
func (*Tock) UserApplier ¶
UserApplier loops through users and applies a anonymous function to a list of late tock users