Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DotfileName = fmt.Sprintf("%s/.%s", cwd, "shiftstatus")
Functions ¶
func CheckStatus ¶
Check the current shift status. Return `false` if `.shiftstatus` does not exist or if `STATUS` is not `ACTIVE`.
func DisplayStatus ¶
func DisplayStatus(displayState bool)
Display the current shift status set in `.shiftstatus`.
func GetCurrentStorageType ¶
func GetCurrentStorageType() string
Get the current `storage-type` value in `.shiftstatus`.
Types ¶
type ShiftData ¶
type ShiftData struct {
Type string // "IN" or "OUT" (clock-in/out)
Date string // Shift (clock-in/out) date
Day string // Shift (clock-in/out) day
Time string // Shift (clock-in/out) time
Message string // Complimentary message
}
Initialize shift data.
func (*ShiftData) RecordToDB ¶
func (shiftData *ShiftData) RecordToDB()
Write data stored in the ShiftData struct to the SQLite instance.
func (*ShiftData) RecordToTimesheet ¶
func (shiftData *ShiftData) RecordToTimesheet()
Write data stored in the ShiftData struct to the timesheet.
type ShiftStatus ¶
type ShiftStatus struct {
Type string // "IN" or "OUT" (clock-in/out)
Status string // "ACTIVE" or "READY"
Time string // Clock-in or clock-out time
Message string // Clock-in or clock-out messsage
}
Shift status struct.
func (*ShiftStatus) SetStatus ¶
func (ss *ShiftStatus) SetStatus()
Set the shift status data in `.shiftstatus`.
Click to show internal directories.
Click to hide internal directories.