model

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityBreakdown

type ActivityBreakdown struct {
	Name      string
	Weight    float64
	Average   float64
	Total     float64
	IsBlocker bool
}

type BlockerInfo

type BlockerInfo struct {
	ActivityName string
	Threshold    float64
}

type CourseItem

type CourseItem struct {
	ID         int
	Name       string
	IsArchived bool
}

type CoursesListInput

type CoursesListInput struct{}

type CoursesListOutput

type CoursesListOutput struct {
	Active   []CourseItem
	Archived []CourseItem
}

type DeadLine

type DeadLine time.Time

func (DeadLine) Before

func (d DeadLine) Before(other DeadLine) bool

func (DeadLine) Format

func (d DeadLine) Format(layout string) string

func (DeadLine) Time

func (d DeadLine) Time() time.Time

func (DeadLine) TimeLeft

func (d DeadLine) TimeLeft() string

func (DeadLine) Urgency

func (d DeadLine) Urgency() UrgencyLevel

func (DeadLine) UrgencyAt

func (d DeadLine) UrgencyAt(now time.Time) UrgencyLevel

type DeadlineItem

type DeadlineItem struct {
	ExerciseName string
	CourseName   string
	State        TaskState
	StateLabel   string
	Deadline     DeadLine
	Reviewer     *Reviewer
}

type DeadlinesListInput

type DeadlinesListInput struct {
	CourseQuery string
}

type DeadlinesListOutput

type DeadlinesListOutput struct {
	Items      []DeadlineItem
	CourseName string
}

type GradesDetailedInput

type GradesDetailedInput struct {
	CourseQuery string
}

type GradesDetailedOutput

type GradesDetailedOutput struct {
	CourseName string
	Activities []ActivityBreakdown
	TotalScore float64
	Tasks      []TaskGrade
	Blockers   []BlockerInfo
}

type GradesSummaryInput

type GradesSummaryInput struct{}

type GradesSummaryItem

type GradesSummaryItem struct {
	CourseName  string
	EarnedScore float64
	MaxScore    float64
	Error       error
}

type GradesSummaryOutput

type GradesSummaryOutput struct {
	Items []GradesSummaryItem
}

type LoginInput

type LoginInput struct {
	Timeout time.Duration
}

type LoginOutput

type LoginOutput struct {
	CookiePath      string
	ValidationError error
}

type MaterialEvent

type MaterialEvent struct {
	Type     MaterialEventType
	Message  string
	FilePath string
}

type MaterialEventType

type MaterialEventType string
const (
	MaterialEventTheme MaterialEventType = "theme"
	MaterialEventPDF   MaterialEventType = "pdf"
	MaterialEventLink  MaterialEventType = "link"
	MaterialEventSaved MaterialEventType = "saved"
	MaterialEventError MaterialEventType = "error"
)

type MaterialsDownloadInput

type MaterialsDownloadInput struct {
	CourseQuery string
	WeekFilter  int
	LinksOnly   bool
	BasePath    string
}

type MaterialsDownloadOutput

type MaterialsDownloadOutput struct {
	TotalFiles      int32
	DownloadedFiles int32
}

type Reviewer

type Reviewer struct {
	FirstName string
	LastName  string
	Email     string
}

func (Reviewer) FullName

func (r Reviewer) FullName() string

type TaskGetInput

type TaskGetInput struct {
	TaskID int
}

type TaskGrade

type TaskGrade struct {
	Name     string
	State    TaskState
	Score    *float64
	MaxScore int
}

type TaskOutput

type TaskOutput struct {
	CourseName      string
	ThemeName       string
	ExerciseName    string
	ActivityName    string
	ActivityWeight  float64
	Deadline        DeadLine
	StartedAt       *time.Time
	SubmitAt        *time.Time
	RejectAt        *time.Time
	EvaluateAt      *time.Time
	Reviewer        *Reviewer
	SolutionURL     string
	MaxScore        int
	LateDaysBalance int

	StateLabel     string
	ScoreFormatted string
}

type TaskState

type TaskState string
const (
	TaskBacklog    TaskState = "backlog"
	TaskInProgress TaskState = "inProgress"
	TaskSubmitted  TaskState = "submitted"
	TaskEvaluated  TaskState = "evaluated"
	TaskFailed     TaskState = "failed"
)

func (TaskState) Label

func (t TaskState) Label() string

type UrgencyLevel

type UrgencyLevel string
const (
	UrgencyUrgent UrgencyLevel = "urgent"
	UrgencySoon   UrgencyLevel = "soon"
	UrgencyNormal UrgencyLevel = "normal"

	DateTimeFormat      = "02 Jan 2006 15:04"
	DateTimeShortFormat = "02 Jan 15:04"
)

Jump to

Keyboard shortcuts

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