Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Approve(app *ShiftApplication) error
- func (c *Client) DoClock(shift *UserShift) error
- func (c *Client) FetchApplications(shift *Shift) ([]ShiftApplication, error)
- func (c *Client) FetchJobs() error
- func (c *Client) Jobs() []Job
- func (c *Client) Login() error
- func (c *Client) MyShifts() []UserShift
- func (c *Client) UserId() int
- type FixedJsonValue
- type GPSCoords
- type Job
- type JsonDate
- type JsonDateNoYear
- type JsonDateTime
- type Shift
- type ShiftApplication
- type ShiftState
- type UserShift
Constants ¶
View Source
const ( NotApproved = 10 Approved = 20 )
View Source
const DateNoYear = "01-02"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Approve ¶
func (c *Client) Approve(app *ShiftApplication) error
func (*Client) FetchApplications ¶
func (c *Client) FetchApplications(shift *Shift) ([]ShiftApplication, error)
type FixedJsonValue ¶
type FixedJsonValue[T any] struct { Value T }
FixedJsonValue makes it possible to unmarshal an json value whose empty value is incorrectly encoded as empty string.
func (*FixedJsonValue[T]) UnmarshalJSON ¶
func (v *FixedJsonValue[T]) UnmarshalJSON(data []byte) error
type JsonDateNoYear ¶
JsonDateNoYear is encoded as MM-dd.
func (*JsonDateNoYear) MarshalJSON ¶
func (d *JsonDateNoYear) MarshalJSON() ([]byte, error)
func (*JsonDateNoYear) UnmarshalJSON ¶
func (d *JsonDateNoYear) UnmarshalJSON(data []byte) error
type JsonDateTime ¶
func (*JsonDateTime) MarshalJSON ¶
func (d *JsonDateTime) MarshalJSON() ([]byte, error)
func (*JsonDateTime) UnmarshalJSON ¶
func (d *JsonDateTime) UnmarshalJSON(data []byte) error
type ShiftApplication ¶
type ShiftState ¶
type ShiftState int
Click to show internal directories.
Click to hide internal directories.