model

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Course added in v3.2.0

type Course struct {
	Name         string `json:"name"`
	CoursePath   string `json:"coursePath"`
	SemesterPath string `json:"semesterPath"`
	// The names of the assignments in this course, sorted.
	AssignmentNames []string  `json:"assignmentNames"`
	StudentCount    int       `json:"studentCount"`
	GroupCount      int       `json:"groupCount"`
	ImportedAt      time.Time `json:"importedAt"`
	UpdatedAt       time.Time `json:"updatedAt"`
}

A course as stored for the current user. Each user sees only their own courses; there is no way to reach another user's course.

type Finding added in v3.2.0

type Finding struct {
	Path     string          `json:"path"`
	Message  string          `json:"message"`
	Severity FindingSeverity `json:"severity"`
}

One lint finding: configuration that does not do what it looks like it does.

type FindingSeverity added in v3.2.0

type FindingSeverity string
const (
	// The setting is present but has no effect.
	FindingSeverityProblem FindingSeverity = "PROBLEM"
	// It works, but the spelling or shape is obsolete.
	FindingSeverityDeprecated FindingSeverity = "DEPRECATED"
)

func (FindingSeverity) IsValid added in v3.2.0

func (e FindingSeverity) IsValid() bool

func (FindingSeverity) MarshalGQL added in v3.2.0

func (e FindingSeverity) MarshalGQL(w io.Writer)

func (FindingSeverity) MarshalJSON added in v3.2.0

func (e FindingSeverity) MarshalJSON() ([]byte, error)

func (FindingSeverity) String added in v3.2.0

func (e FindingSeverity) String() string

func (*FindingSeverity) UnmarshalGQL added in v3.2.0

func (e *FindingSeverity) UnmarshalGQL(v any) error

func (*FindingSeverity) UnmarshalJSON added in v3.2.0

func (e *FindingSeverity) UnmarshalJSON(b []byte) error

type GitLabTokenStatus added in v3.3.0

type GitLabTokenStatus struct {
	Set       bool       `json:"set"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}

Whether the current user has stored a GitLab token, and when it was last set. The token itself is never returned by any query.

type Mutation added in v3.2.0

type Mutation struct {
}

type Query

type Query struct {
}

type ServerInfo

type ServerInfo struct {
	Version string `json:"version"`
	Commit  string `json:"commit"`
	Date    string `json:"date"`
}

Version and build metadata for the running server.

type User

type User struct {
	Email string `json:"email" bson:"email"`
	Name  string `json:"name" bson:"name"`
}

User is an authenticated user of glabs-web. Identity comes from the auth proxy (the OIDC email); a user must be on the allowlist to be let in.

glabs has no role hierarchy — every user manages only their own courses (strict per-user isolation), so there is nothing for roles to gate. The type is written by hand rather than generated so it carries bson tags for MongoDB; gqlgen binds to it via autobind.

Jump to

Keyboard shortcuts

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