command

package
v0.0.0-...-e173b71 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproveTrainingReschedule

type ApproveTrainingReschedule struct {
	TrainingUUID string
	User         training.User
}

type ApproveTrainingRescheduleHandler

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

func NewApproveTrainingRescheduleHandler

func NewApproveTrainingRescheduleHandler(
	repo training.Repository,
	userService UserService,
	trainerService TrainerService,
) ApproveTrainingRescheduleHandler

func (ApproveTrainingRescheduleHandler) Handle

type CancelTraining

type CancelTraining struct {
	TrainingUUID string
	User         training.User
}

type CancelTrainingHandler

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

func NewCancelTrainingHandler

func NewCancelTrainingHandler(repo training.Repository, userService UserService, trainerService TrainerService) CancelTrainingHandler

func (CancelTrainingHandler) Handle

func (h CancelTrainingHandler) Handle(ctx context.Context, cmd CancelTraining) (err error)

type RejectTrainingReschedule

type RejectTrainingReschedule struct {
	TrainingUUID string
	User         training.User
}

type RejectTrainingRescheduleHandler

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

func NewRejectTrainingRescheduleHandler

func NewRejectTrainingRescheduleHandler(repo training.Repository) RejectTrainingRescheduleHandler

func (RejectTrainingRescheduleHandler) Handle

type RequestTrainingReschedule

type RequestTrainingReschedule struct {
	TrainingUUID string
	NewTime      time.Time

	User training.User

	NewNotes string
}

type RequestTrainingRescheduleHandler

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

func NewRequestTrainingRescheduleHandler

func NewRequestTrainingRescheduleHandler(repo training.Repository) RequestTrainingRescheduleHandler

func (RequestTrainingRescheduleHandler) Handle

type RescheduleTraining

type RescheduleTraining struct {
	TrainingUUID string
	NewTime      time.Time

	User training.User

	NewNotes string
}

type RescheduleTrainingHandler

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

func NewRescheduleTrainingHandler

func NewRescheduleTrainingHandler(repo training.Repository, userService UserService, trainerService TrainerService) RescheduleTrainingHandler

func (RescheduleTrainingHandler) Handle

type ScheduleTraining

type ScheduleTraining struct {
	TrainingUUID string

	UserUUID string
	UserName string

	TrainingTime time.Time
	Notes        string
}

type ScheduleTrainingHandler

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

func NewScheduleTrainingHandler

func NewScheduleTrainingHandler(repo training.Repository, userService UserService, trainerService TrainerService) ScheduleTrainingHandler

func (ScheduleTrainingHandler) Handle

type TrainerService

type TrainerService interface {
	ScheduleTraining(ctx context.Context, trainingTime time.Time) error
	CancelTraining(ctx context.Context, trainingTime time.Time) error
	MoveTraining(ctx context.Context, newTime time.Time, originalTrainingTime time.Time) error
}

type UserService

type UserService interface {
	UpdateTrainingBalance(ctx context.Context, userID string, amountChange int) error
}

Jump to

Keyboard shortcuts

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