usecase

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clean

type Clean struct{}

func (Clean) Run

func (u Clean) Run(ctx context.Context) (*CleanResult, error)

type CleanResult

type CleanResult struct {
	AlreadyCleaned bool
	Cleaned        bool
}

type Contest

type Contest struct{}

func (Contest) Run

func (u Contest) Run(ctx context.Context, param ContestParam) (*ContestResult, error)

type ContestList

type ContestList struct{}

func (ContestList) Run

type ContestListParam

type ContestListParam struct {
	RatedType string
	Page      int
	Size      int
}

type ContestListResult

type ContestListResult struct {
	Contests []models.Contest
}

type ContestLoad

type ContestLoad struct{}

func (ContestLoad) Run

type ContestLoadParam

type ContestLoadParam struct {
	RatedType constant.RatedType
	Page      int
}

type ContestLoadResult

type ContestLoadResult struct {
	Created     int
	Updated     int
	CurrentPage int
	TotalPages  int
}

type ContestParam

type ContestParam struct {
	ContestID string
}

type ContestResult

type ContestResult struct {
	Contest models.Contest
}

type Init

type Init struct{}

func (Init) Run

func (u Init) Run(ctx context.Context, param InitParam) (*InitResult, error)

type InitParam

type InitParam struct {
	Force bool
}

type InitResult

type InitResult struct {
	AlreadInitialized bool
	DBFile            string
}

type Submit

type Submit struct{}

func (Submit) Run

func (u Submit) Run(ctx context.Context, param SubmitParam) (*SubmitResult, error)

type SubmitErrorStage

type SubmitErrorStage string
const (
	SubmitErrorStageBuild SubmitErrorStage = "build"
	SubmitErrorStageTest  SubmitErrorStage = "test"
)

type SubmitParam

type SubmitParam struct {
	SkipTest bool
}

type SubmitResult

type SubmitResult struct {
	LoggedIn     bool
	Submitted    bool
	ErrorStage   SubmitErrorStage
	ErrorMessage string
}

type Task

type Task struct{}

func (Task) Run

func (u Task) Run(ctx context.Context, param TaskParam) (*TaskResult, error)

type TaskLocalInit

type TaskLocalInit struct{}

func (TaskLocalInit) Run

type TaskLocalInitParam

type TaskLocalInitParam struct {
	TaskID    string
	ContestID string
}

type TaskLocalInitResult

type TaskLocalInitResult struct {
	ContestID string
	TaskID    string
	New       bool
}

type TaskParam

type TaskParam struct {
	TaskID      string
	ContestID   string
	ShowSamples bool
}

type TaskResult

type TaskResult struct {
	Contest     models.Contest
	ContestTask models.ContestTask
	Task        models.Task
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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