atcoder

package
v0.0.0-...-d980a68 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildProblemID

func BuildProblemID(contestID string, problemFileName string) string

Types

type AtCoderProblemsClient

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

func NewAtCoderProblemsClient

func NewAtCoderProblemsClient(httpClient *http.Client) *AtCoderProblemsClient

func (*AtCoderProblemsClient) GetAllProblems

func (a *AtCoderProblemsClient) GetAllProblems(ctx context.Context) ([]*Problem, error)

type DownloadTestCasesParams

type DownloadTestCasesParams struct {
	// SkipContestFolderNames is the list of content folder name to skip fetching
	SkipContestFolderNames []string
	// Limit is fetching contest count limit. if limit is 0, it fetches all.
	Limit int
}

type Problem

type Problem struct {
	ID        string `json:"id"`
	ContestID string `json:"contestId"`
	Title     string `json:"title"`
}

Problem represents AtCoder's problem metadata

type TestCase

type TestCase struct {
	ContestID         string `json:"contestId"`
	ProblemID         string `json:"problemId"`
	ContestFolderName string `json:"contestFolderName"`
	FileName          string `json:"fileName"`
	In                string `json:"in"`
	Out               string `json:"out"`
}

TestCase represents AtCoder's problem testcase

type TestCaseClient

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

TestCaseClient represents AtCoder testcases client

func NewTestCaseClient

func NewTestCaseClient(dropboxToken string, logger *zap.Logger) *TestCaseClient

func (*TestCaseClient) DownloadContestTestCases

func (c *TestCaseClient) DownloadContestTestCases(ctx context.Context, contestFolderName string) ([]*TestCase, error)

func (*TestCaseClient) DownloadTestCases

func (c *TestCaseClient) DownloadTestCases(ctx context.Context, params *DownloadTestCasesParams) ([]*TestCase, error)

type TestCaseFile

type TestCaseFile struct {
	FileName string
	Content  string
}

Jump to

Keyboard shortcuts

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