schedule

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appointment

type Appointment struct {
	StartAt JaneTime        `json:"start_at"`
	EndAt   JaneTime        `json:"end_at"`
	State   AppointmentType `json:"state"`
	Patient domain.Patient  `json:"patient"`
}

func (Appointment) HasPassed added in v1.1.0

func (appointment Appointment) HasPassed() bool

func (Appointment) ToString

func (appointment Appointment) ToString() string

type AppointmentType added in v1.1.0

type AppointmentType string
const (
	Booked      AppointmentType = "booked"
	Arrived     AppointmentType = "arrived"
	Break       AppointmentType = "break"
	Unscheduled AppointmentType = "unscheduled"
)

type JaneTime

type JaneTime struct {
	time.Time
}

func NewJaneTime

func NewJaneTime(input time.Time) JaneTime

func (JaneTime) HumanDate

func (janeTime JaneTime) HumanDate() string

func (JaneTime) MarshalJSON

func (janeTime JaneTime) MarshalJSON() ([]byte, error)

func (*JaneTime) UnmarshalJSON

func (janeTime *JaneTime) UnmarshalJSON(bytes []byte) error

type Schedule

type Schedule struct {
	Appointments []Appointment `json:"appointments"`
	Shifts       []Shift       `json:"shifts"`
	// contains filtered or unexported fields
}

func New added in v1.1.0

func New() Schedule

func (Schedule) OnlyInclude added in v1.1.0

func (schedule Schedule) OnlyInclude(include []AppointmentType) Schedule

func (Schedule) ShowAll added in v1.1.0

func (schedule Schedule) ShowAll() Schedule

func (Schedule) ToString

func (schedule Schedule) ToString() string

type Shift

type Shift struct {
	StartAt JaneTime `json:"start_at"`
	EndAt   JaneTime `json:"end_at"`
}

TODO: Extract into its own file and have it deserialized

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL