constants

package
v0.0.0-...-34ab1a3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrResultNotObjectID = errors.New("result not object id")
View Source
var ErrUnexpectedClassNumber = errors.New("unexpected class number")
View Source
var ErrUnexpectedComplexityType = errors.New("unexpected complexity type")
View Source
var ErrUnexpectedRepeatType = errors.New("unexpected repeat type")
View Source
var ErrUnexpectedTaskType = errors.New("unexpected task type")

Functions

This section is empty.

Types

type ClassNumber

type ClassNumber int64 // Класс 0 или [5, 11]
const (
	ClassZero   ClassNumber = 0
	ClassFive   ClassNumber = 5
	ClassSix    ClassNumber = 6
	ClassSeven  ClassNumber = 7
	ClassEight  ClassNumber = 8
	ClassNine   ClassNumber = 9
	ClassTen    ClassNumber = 10
	ClassEleven ClassNumber = 11
)

func (ClassNumber) Readable

func (n ClassNumber) Readable() string

func (ClassNumber) Validate

func (n ClassNumber) Validate() error

type ClassNumbers

type ClassNumbers []ClassNumber // Список классов

func (ClassNumbers) Readable

func (ns ClassNumbers) Readable() string

type CollectionName

type CollectionName string
const (
	CollectionUsers    CollectionName = "users"    // Коллекция пользователей
	CollectionTests    CollectionName = "tests"    // Коллекция тестов
	CollectionTasks    CollectionName = "tasks"    // Коллекция задач
	CollectionPassages CollectionName = "passages" // Коллекция прохождений тестов
)

func (CollectionName) String

func (n CollectionName) String() string

type ComplexityType

type ComplexityType string // Условная сложность
const (
	ComplexityUndefined ComplexityType = "undefined"
	ComplexityEasy      ComplexityType = "easy"     // Легко
	ComplexityNormal    ComplexityType = "normal"   // Нормально
	ComplexityHard      ComplexityType = "hard"     // Сложно
	ComplexityVeryHard  ComplexityType = "veryHard" // Очень сложно
)

func (ComplexityType) Equal

func (t ComplexityType) Equal(tt ComplexityType) bool

func (ComplexityType) Readable

func (t ComplexityType) Readable() string

func (ComplexityType) String

func (t ComplexityType) String() string

func (ComplexityType) Validate

func (t ComplexityType) Validate() error

type DatabaseName

type DatabaseName string
const (
	DatabaseCore     DatabaseName = "core"     // Core база с данными о пользователях
	DatabaseSource   DatabaseName = "source"   // База с исходными материалами
	DatabasePassages DatabaseName = "passages" // База с прохождениями тестов
)

func (DatabaseName) String

func (n DatabaseName) String() string

type Duration

type Duration time.Duration // Длительность
const DurationsZero Duration = 0

func (Duration) End

func (d Duration) End() time.Time

func (Duration) Readable

func (d Duration) Readable() string

func (Duration) RoundMillisecond

func (d Duration) RoundMillisecond() Duration

func (Duration) RoundMinute

func (d Duration) RoundMinute() Duration

func (Duration) RoundSecond

func (d Duration) RoundSecond() Duration

func (Duration) Time

func (d Duration) Time() time.Duration

type Points

type Points uint64 // Баллы
const PointsZero Points = 0

func (Points) Readable

func (p Points) Readable() string

type RepeatType

type RepeatType string // Повторяемость
const (
	Disposable RepeatType = "disposable" // Тест можно пройти только один раз
	Repeatable RepeatType = "repeatable" // Тест можно пройти повторно
)

func (RepeatType) Equal

func (t RepeatType) Equal(tt RepeatType) bool

func (RepeatType) Readable

func (t RepeatType) Readable() string

func (RepeatType) String

func (t RepeatType) String() string

func (RepeatType) Validate

func (t RepeatType) Validate() error

type TaskType

type TaskType string // Тип задачи
const (
	TaskText  TaskType = "text"  // Текстовая задача
	TaskRadio TaskType = "radio" // Задача с выбором ответа
)

func (TaskType) Equal

func (t TaskType) Equal(tt TaskType) bool

func (TaskType) Readable

func (t TaskType) Readable() string

func (TaskType) String

func (t TaskType) String() string

func (TaskType) Validate

func (t TaskType) Validate() error

Jump to

Keyboard shortcuts

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