handler

package
v0.0.0-...-adbf6dd Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFrontendPagePolicies

func AddFrontendPagePolicies() error

func AddProblemCasbinPolicies

func AddProblemCasbinPolicies() error

func AddUserCasbinPolicies

func AddUserCasbinPolicies() error

func RenderHTML

func RenderHTML(c *gin.Context)

func SetupAuthRouter

func SetupAuthRouter(baseRoute *gin.RouterGroup)

func SetupEventRouter

func SetupEventRouter(baseRoute *gin.RouterGroup)

func SetupFrontendRoute

func SetupFrontendRoute(baseRoute *gin.RouterGroup, frontendDist string)

func SetupJudgeResultRouter

func SetupJudgeResultRouter(baseRoute *gin.RouterGroup)

func SetupJudgeRouter

func SetupJudgeRouter(baseRoute *gin.RouterGroup)

func SetupJudgeTaskRouter

func SetupJudgeTaskRouter(baseRoute *gin.RouterGroup)

func SetupProblemRouter

func SetupProblemRouter(baseRoute *gin.RouterGroup)

func SetupRankRouter

func SetupRankRouter(baseRoute *gin.RouterGroup)

func SetupSwaggoRouter

func SetupSwaggoRouter(r *gin.RouterGroup)

func SetupUserRouter

func SetupUserRouter(baseRoute *gin.RouterGroup)

func Stream

func Stream(ginCtx *gin.Context)

Stream

@Summary		Stream
@Description	Stream
@Tags			user
@Router			/user/stream [get]
@Accept			text/event-stream
@Produce		text/event-stream
@Success		200	{string}	string	"data: {message}"

Types

type PickJudgeTaskBody

type PickJudgeTaskBody struct {
	Consumer string `json:"consumer"`
}

type PostJudgeBody

type PostJudgeBody struct {
	Code     string                          `json:"code" binding:"required"`
	Language judge_model.ProgrammingLanguage `json:"language" binding:"required"`
}

PostJudgeBody

@Description	The body of a judge request, containing the code and the language used for the judge.
@Property		code (string) required "The source code of the judge" minlength(1)
@Property		language (ProgrammingLanguage) required "The programming language used for the judge"

type ReportJudgeResultBody

type ReportJudgeResultBody struct {
	JudgeUIDString  string `json:"judgeUID"`
	VerdictString   string `json:"verdict"`
	TimeUsageMS     uint   `json:"timeUsageMS"`
	MemoryUsageByte uint   `json:"memoryUsageByte"`
}

type ReportJudgeResultCountBody

type ReportJudgeResultCountBody struct {
	JudgeUID    string `json:"judgeUID"`
	ResultCount uint   `json:"resultCount"`
}

type ReportJudgeTaskBody

type ReportJudgeTaskBody struct {
	Consumer      string `json:"consumer"`
	RedisStreamID string `json:"redisStreamID"`
	VerdictString string `json:"verdict"`
}

Jump to

Keyboard shortcuts

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