model

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	// TaskID is the assignment-instance ID accepted by `cuni task` / get_task.
	TaskID int
}

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
	// TaskID is the assignment-instance ID accepted by `cuni task` / get_task.
	TaskID 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 TimeChannel added in v0.1.10

type TimeChannel struct {
	ID           string
	Name         string
	Title        string
	Kind         TimeChannelKind
	Unread       int64
	Mentions     int64
	Muted        bool
	LastPostAt   time.Time
	LastViewedAt time.Time
}

type TimeChannelKind added in v0.1.10

type TimeChannelKind string
const (
	TimeChannelDM      TimeChannelKind = "dm"
	TimeChannelGroup   TimeChannelKind = "group"
	TimeChannelPublic  TimeChannelKind = "public"
	TimeChannelPrivate TimeChannelKind = "private"
)

type TimeChannelPosts added in v0.1.10

type TimeChannelPosts struct {
	Channel  TimeChannel
	Since    *time.Time
	Messages []TimeMessage
	Total    int
}

type TimeMessage added in v0.1.10

type TimeMessage struct {
	ID           string
	RootID       string
	ChannelID    string
	ChannelTitle string
	Author       string
	FromMe       bool
	At           time.Time
	Text         string
	Replies      int
	Files        int
	System       bool
}

type TimeSearchOutput added in v0.1.10

type TimeSearchOutput struct {
	Terms    string
	Messages []TimeMessage
}

type TimeUpdatesInput added in v0.1.10

type TimeUpdatesInput struct {
	Since         *time.Time
	Kinds         []TimeChannelKind
	IncludeMuted  bool
	MaxPerChannel int
}

type TimeUpdatesOutput added in v0.1.10

type TimeUpdatesOutput struct {
	Since    *time.Time
	Channels []TimeChannelPosts
	Skipped  []TimeChannel
}

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