service

package
v0.0.0-...-6bdd1f0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeNone     = iota
	BadTrainerID = iota + 1
	StartTimeInPast
	TimeIntervalTooLarge
	InvalidAppointmentStartTime
	InvalidAppointmentLength
	OutsideWorkingHours
	OutsideWorkingDays
	Holiday

	// TODO: should come from a config
	MaxTimeIntervalDays  = 31
	MaxTimeInterval      = time.Hour * 24 * MaxTimeIntervalDays
	AppointmentLengthMin = 30
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

TODO: split the routes Service - all in one routes support implementation

func New

func New(storage storage.Storage) (*Service, error)

New ...

func (*Service) CreateAppointment

func (s *Service) CreateAppointment(params su.CreateAppointmentParams) middleware.Responder

CreateAppointment ...

func (*Service) ListAvailableTimesForTrainer

func (s *Service) ListAvailableTimesForTrainer(params su.ListAvailableTimesForTrainerParams) middleware.Responder

ListAvailableTimesForTrainer ...

func (*Service) ListTrainerAppointments

func (s *Service) ListTrainerAppointments(params st.ListTrainerAppointmentsParams) middleware.Responder

ListTrainerAppointments ...

Jump to

Keyboard shortcuts

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