datatypes

package
v0.0.0-...-58eafa5 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressBook

type AddressBook struct {
	Groups  []AddressBookGroup `json:"groups"`
	Classes []AddressBookClass `json:"classes"`
}

AddressBook struct содержит в себе адресную книгу.

func NewAddressBook

func NewAddressBook() *AddressBook

NewAddressBook создает новую адресную книгу.

type AddressBookClass

type AddressBookClass struct {
	ClassName string                 `json:"class_name"`
	Users     []AddressBookClassUser `json:"users"`
	ID        int                    `json:"id"`
}

AddressBookClass struct -- класс (школьный) в адресной книге

type AddressBookClassParent

type AddressBookClassParent struct {
	Parent   string `json:"parent"`
	ParentID string `json:"parent_id"`
}

AddressBookClassParent struct -- родитель ученика в адресной книге

type AddressBookClassUser

type AddressBookClassUser struct {
	Student   string                   `json:"string"`
	StudentID string                   `json:"student_id"`
	Parents   []AddressBookClassParent `json:"parents"`
}

AddressBookClassUser struct -- пользователь в классе из адресной книге

type AddressBookGroup

type AddressBookGroup struct {
	Title string                 `json:"title"`
	Users []AddressBookGroupUser `json:"users"`
	Value string                 `json:"value"`
}

AddressBookGroup struct -- группа пользователей в адресной книге

type AddressBookGroupUser

type AddressBookGroupUser struct {
	Name string `json:"name"`
	ID   int    `json:"id"`
}

AddressBookGroupUser struct -- пользователь в группе из адресной книги

type AverageMarkDynReport

type AverageMarkDynReport struct {
	Data []AverageMarkDynReportNote `json:"table"`
}

AverageMarkDynReport struct - отчет третьего типа.

func NewAverageMarkDynReport

func NewAverageMarkDynReport() *AverageMarkDynReport

type AverageMarkDynReportNote

type AverageMarkDynReportNote struct {
	Date               string  `json:"date"`
	StudentWorksAmount int     `json:"student_works_amount"`
	StudentAverageMark float32 `json:"student_average_mark"`
	ClassWorksAmount   int     `json:"class_works_amount"`
	ClassAverageMark   float32 `json:"class_average_mark"`
}

AverageMarkDynReportNote struct - одна запись в отчёте "Динамика среднего балла".

type AverageMarkReport

type AverageMarkReport struct {
	Table []AverageMarkReportNote `json:"table"`
}

AverageMarkReport struct - отчет второго типа.

func NewAverageMarkReport

func NewAverageMarkReport() *AverageMarkReport

type AverageMarkReportNote

type AverageMarkReportNote struct {
	Subject     string  `json:"subject"`
	StudentMark float32 `json:"student_mark"`
	ClassMark   float32 `json:"class_mark"`
}

AverageMarkReportNote - подотчет об одном предмете.

type Day

type Day struct {
	Number   int            `json:"number"`
	Subjects []SubjectMarks `json:"subjects"`
}

type DaySchoolMarks

type DaySchoolMarks struct {
	Date    string       `json:"date"`
	Lessons []SchoolMark `json:"lessons"`
}

DaySchoolMarks struct содержит в себе оценки и ДЗ на текущий день.

type DayTimeTable

type DayTimeTable struct {
	Date    string   `json:"date"`
	Lessons []Lesson `json:"lessons"`
}

DayTimeTable struct содержит в себе расписание на день.

type Email

type Email struct {
	MessageID  int    `json:"MessageId"`
	FromName   string `json:"FromName"`
	FromEOName string `json:"FromEOName"`
	Subj       string `json:"Subj"`
	Sent       string `json:"Sent"`
	Read       string `json:"Read"`
	SentTo     string `json:"SentTo"`
}

Email struct содержит в себе одно заголовок одного письма.

type EmailDescription

type EmailDescription struct {
	To          []EmailUser `json:"to"`
	Copy        []EmailUser `json:"copy"`
	Description string      `json:"description"`
	Files       []EmailFile `json:"files"`
}

EmailDescription struct - подробности письма.

func NewEmailDescription

func NewEmailDescription() *EmailDescription

type EmailFile

type EmailFile struct {
	FileName string `json:"file_name"`
	Link     string `json:"link"`
	Path     string
	ID       string
}

EmailFile struct - присоединённый к письму файл.

type EmailUser

type EmailUser struct {
	Name string `json:"name"`

	// Это поле наверное надо заполнять из БД, но не уверен. В самом письме указываются лишь имена пользователей без ID.
	ID int `json:"id"`
}

EmailUser struct - пользователь электронной почты.

type EmailsList

type EmailsList struct {
	TotalRecordCount int     `json:"TotalRecordCount"`
	ResultStatus     int     `json:"ResultStatus"`
	Result           string  `json:"Result"`
	Record           []Email `json:"Records"`
}

EmailsList struct содержит в себе список писем.

func NewEmailsList

func NewEmailsList() *EmailsList

type File

type File struct {
	Name string `json:"name"`
	Link string `json:"link"`
}

File struct struct содержит в себе один файл в школьных ресурсах.

type ForumTheme

type ForumTheme struct {
	Date       string `json:"date"`
	LastAuthor string `json:"last_author"`
	ID         int    `json:"id"`
	Creator    string `json:"creator"`
	Answers    int    `json:"answers"`
	Title      string `json:"title"`

	// Это поле заполняется из БД.
	Unread bool `json:"unread"`
}

ForumTheme struct содержит в себе одну тему форума.

type ForumThemeMessage

type ForumThemeMessage struct {
	Date    string `json:"date"`
	Author  string `json:"author"`
	Role    string `json:"role"`
	Message string `json:"message"`

	// Это поле заполняется из БД.
	Unread bool `json:"unread"`
}

ForumThemeMessage struct содержит в себе подробности одного сообщения на форуме.

type ForumThemeMessages

type ForumThemeMessages struct {
	Messages []ForumThemeMessage `json:"messages"`
}

ForumThemeMessages struct содержит в себе все сообщения из темы форума.

func NewForumThemeMessages

func NewForumThemeMessages() *ForumThemeMessages

type ForumThemesList

type ForumThemesList struct {
	Posts []ForumTheme `json:"posts"`
}

ForumThemesList struct содержит в себе список тем форума.

func NewForumThemesList

func NewForumThemesList() *ForumThemesList

type Group

type Group struct {
	GroupTitle string     `json:"groupTitle"`
	Files      []File     `json:"files"`
	Subgroups  []Subgroup `json:"subgroups"`
}

Group struct содержит в себе одну группу файлов в школьных ресурсах.

type JournalAccessReport

type JournalAccessReport struct {
	Data []JournalAccessReportNote `json:"table"`
}

JournalAccessReport struct - отчет седьмого типа.

func NewJournalAccessReport

func NewJournalAccessReport() *JournalAccessReport

type JournalAccessReportNote

type JournalAccessReportNote struct {
	Class      int    `json:"class"`
	Subject    string `json:"subject"`
	Date       string `json:"date"`
	User       string `json:"user"`
	LessonDate string `json:"lesson_date"`
	Period     string `json:"period"`
	Action     string `json:"action"`
}

JournalAccessReportNote struct - одна запись в отчёте о доступе к классному журналу

type Lesson

type Lesson struct {
	Begin     string `json:"begin"`
	End       string `json:"end"`
	Name      string `json:"name"`
	ClassRoom string `json:"classroom"`
}

Lesson struct содержит в себе один урок.

type LessonDescription

type LessonDescription struct {
	Description string `json:"description"`
	Author      string `json:"author"`
	File        string `json:"file"`
	FileName    string `json:"fileName"`
}

LessonDescription struct содержит в себе подробности задания.

type LessonMap

type LessonMap struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

LessonMap struct содержит в себе имя предмета и его id.

type LessonsMap

type LessonsMap struct {
	Data []LessonMap `json:"lessons"`
}

LessonsMap struct содержит в себе список пар {предмет, id}

func NewLessonsMap

func NewLessonsMap() *LessonsMap

type Month

type Month struct {
	Name string `json:"name"`
	Days []Day  `json:"days"`
}

type ParentInfoLetterData

type ParentInfoLetterData struct {
	ReportTypes []ReportType `json:"report_types"`
	Periods     []Period     `json:"periods"`
}

ParentInfoLetterData struct - данные для отчета восьмого типа(Информационное письмо для родителей).

func NewParentInfoLetterData

func NewParentInfoLetterData() *ParentInfoLetterData

type ParentInfoLetterReport

type ParentInfoLetterReport struct {
	Data []ParentInfoLetterReportNote `json:"table"`
}

ParentInfoLetterReport struct - отчет восьмого типа.

func NewParentInfoLetterReport

func NewParentInfoLetterReport() *ParentInfoLetterReport

type ParentInfoLetterReportNote

type ParentInfoLetterReportNote struct {
	Name          string  `json:"name"`
	Marks         []int   `json:"marks"`
	AverageMark   float32 `json:"average_mark"`
	MarkForPeriod int     `json:"mark_for_period"`
}

ParentInfoLetterReportNote struct - одна запись в отчёте "Информационное письмо для родителей"

type Period

type Period struct {
	PeriodID   int    `json:"period_id"`
	PeriodName string `json:"period_name"`
}

Period struct - период

type Post

type Post struct {
	ID      int    `json:"id"`
	Unread  bool   `json:"unread"`
	Author  string `json:"author"`
	Title   string `json:"title"`
	Date    string `json:"date"`
	Message string `json:"message"`
	File    string `json:"file"`

	// Ссылка на файл
	FileLink string

	// ID файла
	FileID string

	// Имя файла
	FileName string
}

Post struct - одно объявление.

type Posts

type Posts struct {
	Posts []Post `json:"posts"`
}

Posts struct - объявления.

type Profile

type Profile struct {
	Role       string `json:"role"`
	Surname    string `json:"surname"`
	Name       string `json:"name"`
	Username   string `json:"username"`
	Schoolyear string `json:"schoolyear"`
	UID        string `json:"uid"`
}

Profile struct - профиль пользователя.

type ReportType

type ReportType struct {
	ReportTypeID   int    `json:"report_type_id"`
	ReportTypeName string `json:"report_type_name"`
}

ReportType struct - тип отчёта

type Resources

type Resources struct {
	Data []Group `json:"data"`
}

Resources struct содержит в себе школьные ресурсы.

func NewResources

func NewResources() *Resources

type SchoolMark

type SchoolMark struct {
	// Для последующего AJAX-запроса.
	Date string `json:"date"`
	AID  int    `json:"AID"`
	CID  int    `json:"CID"`
	TP   int    `json:"TP"`
	// Собственно ответ.
	Status int    `json:"status"`
	InTime bool   `json:"inTime"`
	Name   string `json:"name"`
	Author string `json:"author"`
	Title  string `json:"title"`
	Type   string `json:"type"`
	Mark   string `json:"mark"`
	Weight string `json:"weight"`
}

SchoolMark struct содержит в себе оценку и ДЗ по одному уроку.

type Session

type Session struct {
	// Общая структура.
	Sess *gr.Session
	Serv *cp.School
	// Тип: родитель или ученик.
	Type Type
	// Только для родителей с 2-мя и более детьми.
	Children map[string]Student
	// Для учеников, а также для родителей с одним ребенком.
	Child Student
	// Для серверов первого типа.
	AT  string
	VER string
}

Session struct содержит в себе описание сессии к одному из школьных серверов.

type Student

type Student struct {
	SID  string
	CLID string
}

Student struct содержит в себе информацию о ребенке.

type StudentGradeReport

type StudentGradeReport struct {
	Data []StudentGradeReportNote `json:"table"`
}

StudentGradeReport struct - отчет четвертого типа.

func NewStudentGradeReport

func NewStudentGradeReport() *StudentGradeReport

type StudentGradeReportNote

type StudentGradeReportNote struct {
	Type             string `json:"type"`
	Theme            string `json:"theme"`
	DateOfCompletion string `json:"date_of_completion"`
	Mark             int    `json:"mark"`
}

StudentGradeReportNote struct - одна запись в отчете об успеваемости.

type StudentTotalReport

type StudentTotalReport struct {
	MainTable    []Month              `json:"months"`
	AverageMarks []SubjectAverageMark `json:"average_marks"`
}

StudentTotalReport struct - отчет пятого типа.

func NewStudentTotalReport

func NewStudentTotalReport() *StudentTotalReport

type Subgroup

type Subgroup struct {
	SubgroupTitle string `json:"subgroupTitle"`
	Files         []File `json:"files"`
}

Subgroup struct содержит в себе подгруппы файлов.

type SubjectAverageMark

type SubjectAverageMark struct {
	Name string  `json:"name"`
	Mark float32 `json:"mark"`
}

type SubjectMarks

type SubjectMarks struct {
	Name  string   `json:"name"`
	Marks []string `json:"marks"`
}

type TimeTable

type TimeTable struct {
	Days []DayTimeTable `json:"days"`
}

TimeTable struct содержит в себе расписание на N дней (N = 1, 2, ..., 7).

func NewTimeTable

func NewTimeTable() *TimeTable

type TotalMarkReport

type TotalMarkReport struct {
	Table []TotalMarkReportNote `json:"table"`
}

TotalMarkReport struct - отчет первого типа.

func NewTotalMarkReport

func NewTotalMarkReport() *TotalMarkReport

type TotalMarkReportNote

type TotalMarkReportNote struct {
	Subject string `json:"subject"`
	Period1 int    `json:"period1"`
	Period2 int    `json:"period2"`
	Period3 int    `json:"period3"`
	Period4 int    `json:"period4"`
	Year    int    `json:"year"`
	Exam    int    `json:"exam"`
	Final   int    `json:"final"`
}

TotalMarkReportNote struct - подотчет об одном предмете.

type Type

type Type int

Type является enum'ом для типа сессии:

const (
	// Undefined - значение по умолчанию.
	Undefined Type = iota
	// Parent - значение для родителя.
	Parent
	// Child - значение для ребенка.
	Child
)

type WeekSchoolMarks

type WeekSchoolMarks struct {
	Data []DaySchoolMarks `json:"days"`
}

WeekSchoolMarks struct содержит в себе оценки и ДЗ на текущую неделю.

func NewWeekSchoolMarks

func NewWeekSchoolMarks() *WeekSchoolMarks

Jump to

Keyboard shortcuts

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