requests

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrReqContestID  = newRequiredError("Contest ID")
	ErrReqTaskID     = newRequiredError("Task ID")
	ErrReqSourceCode = newRequiredError("Source code")
	ErrReqCSRFToken  = newRequiredError("CSRF token")

	ErrPageGT0 = errors.New("Page must be greater than 0")

	ErrInvalidRatedType  = newInvalidErrorFunc[constant.RatedType]("rated type")
	ErrInvalidCategory   = newInvalidErrorFunc[constant.ContestCategory]("category")
	ErrInvalidLanguageID = newInvalidErrorFunc[constant.LanguageID]("language ID")
)

Functions

This section is empty.

Types

type Contest

type Contest struct {
	ContestID string
}

func (Contest) Validate added in v0.0.7

func (r Contest) Validate() error

type ContestArchive

type ContestArchive struct {
	Page      int
	RatedType *constant.RatedType
	Category  *constant.ContestCategory
	Keyword   *string
}

func (ContestArchive) URLValues

func (r ContestArchive) URLValues() url.Values

func (ContestArchive) Validate added in v0.0.7

func (r ContestArchive) Validate() error

type ContestTask

type ContestTask struct {
	ContestID string
}

func (ContestTask) Validate added in v0.0.7

func (r ContestTask) Validate() error

type Home

type Home struct{}

func (Home) Validate added in v0.0.7

func (r Home) Validate() error

type Login

type Login struct {
	Username  string
	Password  string
	CSRFToken string
	Continue  string
}

func (Login) URLValues

func (r Login) URLValues() url.Values

type Submit

type Submit struct {
	ContestID  string
	TaskID     string
	LanguageID constant.LanguageID
	SourceCode string
	CSRFToken  string
}

func (Submit) URLValues

func (r Submit) URLValues() url.Values

func (Submit) Validate added in v0.0.7

func (r Submit) Validate() error

type Task

type Task struct {
	ContestID string
	TaskID    string
}

func (Task) Validate added in v0.0.7

func (r Task) Validate() error

Jump to

Keyboard shortcuts

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