database

package
v0.0.0-...-0169c2d Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(item interface{})

Delete item

func GetAll

func GetAll(table string) *list.List

GetAll returns all items

func GetTaskBySubject

func GetTaskBySubject(subject string) *list.List

GetTaskBySubject rt

func Insert

func Insert(item interface{})

Insert item

func Update

func Update(id int, item interface{})

Update item

Types

type TaskInfo

type TaskInfo struct {
	ID       int
	Subject  string
	SubTitle string
	FileType string
	Start    time.Time
	End      time.Time
	ClassNO  int
}

TaskInfo table item

func GetTaskByID

func GetTaskByID(id int) *TaskInfo

GetTaskByID rt

type TaskInfoSlice

type TaskInfoSlice []TaskInfo

TaskInfoSlice for sort type

func (TaskInfoSlice) Len

func (tasks TaskInfoSlice) Len() int

Len for sort

func (TaskInfoSlice) Less

func (tasks TaskInfoSlice) Less(i, j int) bool

Less for sort by id (Less)

func (TaskInfoSlice) Swap

func (tasks TaskInfoSlice) Swap(i, j int)

Swap for sort

type UploadLog

type UploadLog struct {
	ID       int
	Time     time.Time
	SubmitTo int
	Email    string
	FileMD5  string
}

UploadLog table item

func GetUploadLogByEMail

func GetUploadLogByEMail(email string) []UploadLog

GetUploadLogByEMail rt

type UserInfo

type UserInfo struct {
	ID        int
	Email     string
	StudentID string
}

UserInfo table item

func GetUserInfoByEmail

func GetUserInfoByEmail(email string) UserInfo

GetUserInfoByEmail rt

func GetUserInfoBySID

func GetUserInfoBySID(stuid string) UserInfo

GetUserInfoBySID rt

Jump to

Keyboard shortcuts

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