mock

package
v0.0.0-...-4b23463 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcademicsService

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

func NewAcademicsService

func NewAcademicsService(teachers []string, students []string, groups []string) *AcademicsService

func (*AcademicsService) GroupExists

func (m *AcademicsService) GroupExists(_ context.Context, groupID string) error

func (*AcademicsService) StudentExists

func (m *AcademicsService) StudentExists(_ context.Context, studentID string) error

func (*AcademicsService) TeacherExists

func (m *AcademicsService) TeacherExists(_ context.Context, teacherID string) error

type AddCollaboratorsHandler

type AddCollaboratorsHandler func(ctx context.Context, cmd app.AddCollaboratorCommand) error

func (AddCollaboratorsHandler) Handle

type AddStudentHandler

type AddStudentHandler func(ctx context.Context, cmd app.AddStudentCommand) error

func (AddStudentHandler) Handle

type AddTaskHandler

type AddTaskHandler func(ctx context.Context, cmd app.AddTaskCommand) (int, error)

func (AddTaskHandler) Handle

func (m AddTaskHandler) Handle(ctx context.Context, cmd app.AddTaskCommand) (int, error)

type CoursesRepository

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

func NewCoursesRepository

func NewCoursesRepository(courses ...*course.Course) *CoursesRepository

func (*CoursesRepository) AddCourse

func (m *CoursesRepository) AddCourse(_ context.Context, crs *course.Course) error

func (*CoursesRepository) CoursesNumber

func (m *CoursesRepository) CoursesNumber() int

func (*CoursesRepository) GetCourse

func (m *CoursesRepository) GetCourse(_ context.Context, courseID string) (*course.Course, error)

func (*CoursesRepository) UpdateCourse

func (m *CoursesRepository) UpdateCourse(
	ctx context.Context,
	courseID string,
	updateFn command.UpdateFunction,
) error

type CreateCourseHandler

type CreateCourseHandler func(ctx context.Context, cmd app.CreateCourseCommand) (string, error)

func (CreateCourseHandler) Handle

type ExtendCourseHandler

type ExtendCourseHandler func(ctx context.Context, cmd app.ExtendCourseCommand) (string, error)

func (ExtendCourseHandler) Handle

type RemoveCollaboratorHandler

type RemoveCollaboratorHandler func(ctx context.Context, cmd app.RemoveCollaboratorCommand) error

func (RemoveCollaboratorHandler) Handle

type RemoveStudentHandler

type RemoveStudentHandler func(ctx context.Context, cmd app.RemoveStudentCommand) error

func (RemoveStudentHandler) Handle

Jump to

Keyboard shortcuts

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