db

package
v0.0.0-...-9fd2f6d Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Booking

func Booking(class string, date time.Time, slot int, faculty string, subject string) (int64, error)

func CancelBooking

func CancelBooking(class string, date time.Time, slot int) error

func GetAllClass

func GetAllClass() []string

func GetAllSlot

func GetAllSlot() []int

func GetAllSubject

func GetAllSubject() []string

func GetFreeClass

func GetFreeClass(slot int, date time.Time) []string

func GetFreeSlot

func GetFreeSlot(class string, date time.Time) []int

func GetTimetableByDay

func GetTimetableByDay(class string, date time.Time) []string

func MultiBooking

func MultiBooking(class string, date time.Time, startSlot int, endSlot int, faculty string, subject string) (int64, error)

func MultiFreeSlot

func MultiFreeSlot(startSlot int, endSlot int, date time.Time) []string

Types

type BookingRecord

type BookingRecord struct {
	Class   string    `json:"class"`
	Date    time.Time `json:"date"`
	Slot    int       `json:"slot"`
	Faculty string    `json:"faculty"`
	Subject string    `json:"subject"`
}

func GetBooking

func GetBooking(faculty string) []BookingRecord

Jump to

Keyboard shortcuts

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