http

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTaskHttpHandler

func NewTaskHttpHandler(taskSrvc srvc.TaskService, opts ...HandlerOption) *taskHttpHandler

Types

type Empty

type Empty struct{}

type Example

type Example struct {
	Input  string `json:"input"`
	Output string `json:"output"`
	MdNote string `json:"md_note,omitempty"`
}

type HandlerOption

type HandlerOption func(*taskHttpHandler)

func WithFileStores

func WithFileStores(publicAssetStore, testfileStore *filestore.Store, testfileDownloadSigningKey []byte) HandlerOption

type IllustrationImage

type IllustrationImage struct {
	HttpUrl   string `json:"http_url"`
	WidthPx   int    `json:"width_px"`
	HeightPx  int    `json:"height_px"`
	SzInBytes int    `json:"sz_in_bytes"`
}

type MdStatement

type MdStatement struct {
	Story   string `json:"story"`
	Input   string `json:"input"`
	Output  string `json:"output"`
	Notes   string `json:"notes"`
	Scoring string `json:"scoring"`
	Talk    string `json:"talk"`
	Example string `json:"example"`
}

type PutStatementReq

type PutStatementReq struct {
	Story   string `json:"story"`
	Input   string `json:"input"`
	Output  string `json:"output"`
	Notes   string `json:"notes"`
	Scoring string `json:"scoring"`
	Talk    string `json:"talk"`
	Example string `json:"example"`
}

type StatementImage

type StatementImage struct {
	S3Key     string `json:"s3_key"`
	Filename  string `json:"filename"`
	HttpUrl   string `json:"http_url"`
	WidthPx   int    `json:"width_px"`
	HeightPx  int    `json:"height_px"`
	SzInBytes int    `json:"sz_in_bytes"`
}

type SubtaskOverview

type SubtaskOverview struct {
	SubtaskID    int               `json:"subtask"`
	Score        int               `json:"score"`
	Descriptions map[string]string `json:"descriptions"`
}

type Task

type Task struct {
	ShortTaskID          string             `json:"short_task_id"`
	TaskFullName         string             `json:"task_full_name"`
	MemoryLimitMegabytes int                `json:"memory_limit_megabytes"`
	CPUTimeLimitSeconds  float64            `json:"cpu_time_limit_seconds"`
	OriginOlympiad       string             `json:"origin_olympiad"`
	IllustrationImg      *IllustrationImage `json:"illustration_img"`
	DifficultyRating     *int               `json:"difficulty_rating"`
	DefaultMDStatement   MdStatement        `json:"default_md_statement"`
	StatementImages      []StatementImage   `json:"statement_images"`
	Examples             []Example          `json:"examples"`
	OriginNotes          map[string]string  `json:"origin_notes"`
	VisibleInputSubtasks []VisInputSubtask  `json:"visible_input_subtasks"`
	StatementSubtasks    []SubtaskOverview  `json:"statement_subtasks"`
	TestingType          string             `json:"testing_type"`
}

type TaskPreview

type TaskPreview struct {
	ShortId          string             `json:"short_id"`
	FullName         string             `json:"full_name"`
	IllustrImg       *IllustrationImage `json:"illustr_img"`
	DifficultyRating int                `json:"difficulty_rating"`
	OriginOlympiad   string             `json:"origin_olympiad"`
	OriginNote       string             `json:"origin_note"`
	OriginNoteShort  string             `json:"origin_note_short"`
	MdStatementStory string             `json:"md_statement_story"`
}

type TestWithOnlyInput

type TestWithOnlyInput struct {
	TestID int    `json:"test_id"`
	Input  string `json:"input"`
}

type UploadTaskResponse

type UploadTaskResponse struct {
	TaskId string `json:"task_id"`
}

type VisInputSubtask

type VisInputSubtask struct {
	SubtaskID  int                 `json:"subtask"`
	TestInputs []TestWithOnlyInput `json:"inputs"`
}

Jump to

Keyboard shortcuts

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