Documentation ¶
Overview ¶
Package doctor provides functionality to manage doctors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Doctors ¶
type Doctors struct {
// contains filtered or unexported fields
}
Doctors contains and manages a set of doctors.
func LoadDoctors ¶
LoadDoctors loads the doctors from the given file. Returns an error if any entry is invalid.
func (*Doctors) Add ¶
Add adds a doctor to the set of available doctors. Returns an error if the doctor with the same ID already exists.
func (*Doctors) GetByID ¶
GetByID returns a doctor by ID or nil if no doctor is mapped to a given ID.
func (*Doctors) GetByName ¶
GetByName returns a doctor by firstName and surname. Returns nil if no matching doctor found.
func (*Doctors) GetRandomDoctor ¶
GetRandomDoctor returns a random doctor. Returns nil if no doctors are specified.
Click to show internal directories.
Click to hide internal directories.