class

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(server rest.Server, store Store) *chi.Mux

Types

type Class

type Class struct {
	Id        string         `json:"id"`
	Name      string         `json:"name"`
	Weekdays  []time.Weekday `json:"weekdays"`
	StartTime time.Time      `json:"startTime"`
	EndTime   time.Time      `json:"endTime"`
}

type Store

type Store interface {
	DeleteClass(id string) (int, error)
	GetClass(id string) (*Class, error)
	UpdateClass(id string, name string, weekdays []time.Weekday, startTime time.Time, endTime time.Time) (int, error)
	CheckPermission(userId string, classId string) (bool, error)
}

Jump to

Keyboard shortcuts

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