models

package
v0.0.0-...-0136d5f Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GroupMap = make(map[string]bool)

Functions

func Combined

func Combined(lesson1, lesson2 Lesson) bool

func RemoveElementLesson

func RemoveElementLesson(a *[]Lesson, i int)

Types

type Group

type Group struct {
	Days     map[string][]Lesson `json:"days" bson:"days,omitempty"`
	Name     string              `json:"name" bson:"name"`
	SubGroup int                 `json:"subgroup,omitempty" bson:"subgroup,omitempty"` // номер подгруппы
}

func NewGroup

func NewGroup() (g Group)

func (Group) Clear

func (g Group) Clear()

type GroupList

type GroupList struct {
	Map map[string]bool `json:"map" bson:"map"`
}

func CreateGroupList

func CreateGroupList() GroupList

type Hash

type Hash struct {
	Hash *[]string
}

type Lesson

type Lesson struct {
	Subject          string `json:"subject" bson:"subject"`                         //название предмета
	TypeOfLesson     string `json:"typeOfLesson" bson:"typeOfLesson"`               //тип занятия
	TeacherName      string `json:"teacherName" bson:"teacherName"`                 //фио преподавателя
	Cabinet          string `json:"cabinet" bson:"cabinet"`                         //кабинет
	NumberLesson     int    `json:"numberLesson" bson:"numberLesson"`               //номер пары
	DayOfWeek        string `json:"dayOfWeek,omitempty" bson:"dayOfWeek,omitempty"` //день недели
	OccurrenceLesson []bool `json:"occurrenceLesson" bson:"occurrenceLesson"`       //номера недель в которых присутствует эта пара
	Exists           bool   `json:"exists,omitempty" bson:"exists,omitempty"`       //для пустых пар??
	SubGroup         int    `json:"subGroup,omitempty" bson:"subGroup,omitempty"`   // номер подгруппы
}

func NewLesson

func NewLesson() Lesson

func (Lesson) FillInWeeks

func (l Lesson) FillInWeeks(week string)

type NodeParams

type NodeParams struct {
	NodeName   string
	NodeType   html.NodeType
	Attributes []html.Attribute
}

TODO: Create methods & encapsulate struct

type ResponseGroup

type ResponseGroup struct {
	ErrorMsg string `json:"errorMsg,omitempty"`
	Group    *Group `json:"group"`
}

type ResponseGroupList

type ResponseGroupList struct {
	ErrorMsg  string          `json:"errorMsg,omitempty"`
	GroupList map[string]bool `json:"groupList"`
}

type ResponseHash

type ResponseHash struct {
	ErrorMsg string   `json:"errorMsg,omitempty"`
	Hash     []string `json:"hash"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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