Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNumber ¶
CheckNumber is a checker if an error is returned by the string conversion library
func HttpRoutes ¶
HttpRoutes is the combination of all routes to expose the scheduling API to the web. The sole route /{month}/{day}/{year} has two methods:
- GET - To retrieve the list of all employees' shift given a certain shift date
- PUT - Creates a new employee shift to the list of all employee shifts assuming it doesn't overlap with the schedule.
func Interval ¶
Interval is the wrapper function that extract's the employee's shift time information into interval
func NoIOPermissionsPanic ¶
func NoIOPermissionsPanic(err error)
NoIOPermissionsPanic is a checker if an error is returned by the File Handling library
func TimeToNumeric ¶
TimeToNumeric converts hour and minute into the equivalent integer representation that serves as the order or index of a 24-hour pattern
Types ¶
type DayRecord ¶
DayRecord is a struct that holds the Month, Day, and Year to form the basis of the name of the directory for later storage of all shifts. This struct contains methods that let's the user save the new employee's shift to the day shift in the DayRecord directory
func (DayRecord) ClockIn ¶
ClockIn clocks in the employee with the start and end time interval to the current shift day. This makes use of the scheduler's overlapping logic and the operations of the linked list used by the scheduler. When nothing overlaps, the employee shift information will be stored in a text file inside the directory that is named by the date of the shift in question.
type Shift ¶
Shift is the structure for the Shift of the employee. Start is the starting time of the employee inclusively while the End is the ending shift of the employee exclusively. This struct is the node of a doubly-linked list. The next node must be the next shift accordingly by time.
func Add ¶
Add adds the new employee to the day's shift's linked list and automatically validates any overlapping schedules and inserts according to the order of time
func Construct ¶
Construct is the construction of the linked list of all employees' shift from a certain shift day. This retrieves all text files in a certain directory named after the shift day in m.d.YYYY format