Documentation
¶
Index ¶
- func Handler(svc BookingService, logger *slog.Logger) http.Handler
- type Booking
- type BookingService
- type ID
- type Repo
- func (r *Repo) AddBooking(ctx context.Context, booking Booking) error
- func (r *Repo) BookingStates() []State
- func (r *Repo) CountBookingsByState(ctx context.Context, teacherID users.ID) (map[string]map[State]int, error)
- func (r *Repo) GetLastBooking(ctx context.Context, teacherID users.ID, studentID students.ID) (ID, time.Time, time.Time, error)
- func (r *Repo) ListBookingsByState(ctx context.Context, postponed State) ([]Booking, error)
- func (r *Repo) ListDayBookings(ctx context.Context, teacherID users.ID, date time.Time) ([]Booking, error)
- func (r *Repo) MoveBooking(ctx context.Context, bookingID ID, startTime time.Time, endTime time.Time) error
- func (r *Repo) SetBookingState(ctx context.Context, bookingID ID, state State) error
- type Service
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BookingService ¶
type BookingService interface {
ListDayBookings(ctx context.Context, teacherID users.ID, date time.Time) ([]Booking, error)
AddBookings(ctx context.Context, teacherID users.ID, studentID students.ID, startTime, endTime time.Time, count int) error
MoveBooking(ctx context.Context, id ID, startTime, endTime time.Time) error
SetBookingState(ctx context.Context, id ID, state State) error
}
type Repo ¶
func (*Repo) BookingStates ¶
func (*Repo) CountBookingsByState ¶
func (*Repo) GetLastBooking ¶
func (*Repo) ListBookingsByState ¶
func (*Repo) ListDayBookings ¶
func (*Repo) MoveBooking ¶
Click to show internal directories.
Click to hide internal directories.