user

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserRouter

func NewUserRouter(
	cfg *config.Config,
	db *gorm.DB,
	scheduler *judger.Scheduler,
	appState *judger.AppState) *gin.Engine

NewUserRouter creates and configures the user Gin engine.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler holds all dependencies for the user API handlers.

func NewHandler

func NewHandler(
	cfg *config.Config,
	db *gorm.DB,
	scheduler *judger.Scheduler,
	appState *judger.AppState,
) *Handler

NewHandler creates a new user handler with its dependencies.

type ProblemResponse

type ProblemResponse struct {
	ID             string                 `json:"id"`
	Name           string                 `json:"name"`
	Level          string                 `yaml:"level" json:"level"`
	StartTime      time.Time              `json:"starttime"`
	EndTime        time.Time              `json:"endtime"`
	MaxSubmissions int                    `json:"max_submissions"`
	Cluster        string                 `json:"cluster"`
	CPU            int                    `json:"cpu"`
	Memory         int64                  `json:"memory"`
	Upload         judger.UploadLimit     `json:"upload"`
	Workflow       []WorkflowStepResponse `json:"workflow"`
	Score          judger.ScoreConfig     `json:"score"`
	Description    string                 `json:"description"`
}

type PublicProfileResponse

type PublicProfileResponse struct {
	ID        string `json:"id"`
	Username  string `json:"username"`
	Nickname  string `json:"nickname"`
	Signature string `json:"signature"`
	AvatarURL string `json:"avatar_url"`
	Tags      string `json:"tags"`
}

PublicProfileResponse 定义了用户的公开可访问信息。

type WorkflowStepResponse

type WorkflowStepResponse struct {
	Name string `json:"name"`
	Show bool   `json:"show"`
}

Jump to

Keyboard shortcuts

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