Documentation
¶
Index ¶
- func StrfmtDateTimeToTime(date *strfmt.DateTime) time.Time
- type Item
- type Items
- type Reservation
- func (r Reservation) GetEndTime() (error, time.Time)
- func (r Reservation) GetTime() (error, time.Time)
- func (r Reservation) Overlap(other Reservation) (error, bool)
- func (r Reservation) ReservedAt(time time.Time) (error, bool)
- func (r Reservation) String() string
- func (m *Reservation) Validate(formats strfmt.Registry) error
- type User
- type Users
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶
type Item struct {
/* description
Max Length: 2048
Min Length: 1
*/
Description string `json:"description,omitempty"`
/* id
Read Only: true
*/
ID int64 `json:"id,omitempty"`
/* name of the thing in the lab reserved
Required: true
Max Length: 512
Min Length: 1
*/
Name *string `json:"name"`
/* ordered list of reservations
*/
Reservations []*Reservation `json:"reservations,omitempty"`
}
Item item
swagger:model item
type Items ¶
Items map of items
swagger:model items
type Reservation ¶
type Reservation struct {
/* approved or not
Required: true
*/
Approved *bool `json:"approved"`
/* date-time the reservation begins
Required: true
*/
Begin *strfmt.DateTime `json:"begin"`
/* date-time the reservation ends
Required: true
*/
End *strfmt.DateTime `json:"end"`
/* user claiming the reservation
Required: true
*/
Username *string `json:"username"`
}
Reservation date-time marking start of reservation, duration, and owner of the reservation
swagger:model reservation
func NewReservation ¶
func (Reservation) GetEndTime ¶
func (r Reservation) GetEndTime() (error, time.Time)
func (Reservation) GetTime ¶
func (r Reservation) GetTime() (error, time.Time)
returns a zero time on error
func (Reservation) Overlap ¶
func (r Reservation) Overlap(other Reservation) (error, bool)
func (Reservation) ReservedAt ¶
func (r Reservation) ReservedAt(time time.Time) (error, bool)
func (Reservation) String ¶
func (r Reservation) String() string
type User ¶
type User struct {
/* user contact email
Required: true
*/
Email *strfmt.Email `json:"email"`
/* id
Read Only: true
*/
ID int64 `json:"id,omitempty"`
/* reservation user's name
Required: true
Max Length: 512
Min Length: 1
*/
Name *string `json:"name"`
}
User user
swagger:model user
Click to show internal directories.
Click to hide internal directories.