Documentation ¶
Index ¶
- Constants
- func LocalizeLanguage(lang provider.Lang) (string, error)
- type ChallengeData
- type Client
- func (client *Client) Configure(config provider.BackendConfig) error
- func (client *Client) Do(method string, path string, req interface{}, output interface{}) error
- func (client *Client) DoMany(method string, path string, req interface{}, output interface{}) error
- func (client *Client) DoSubmit(contest string, slug string, lang string, code string) (*SubmissionState, error)
- func (client *Client) FindNextChallenge(filters provider.Filters) (provider.Filters, error)
- func (client *Client) GetChallenge(filters provider.Filters) (provider.Challenge, error)
- func (client *Client) GetChallengeData(contest string, challenge string) (*ChallengeData, error)
- func (client *Client) GetLogIn() (string, string, error)
- func (client *Client) GetTestcaseData(contest string, challengeId int64, submissionId int64, testcaseId int64) (*TestcaseData, error)
- func (client *Client) GetUnlockedTestcases(contest string, challengeId int64) ([]int64, error)
- func (client *Client) HasUnlockedTestcase(contest string, challengeId int64, target int64) (bool, error)
- func (client *Client) IsSignedIn() (bool, error)
- func (client *Client) ListChallenges(contest string, track string, offset uint64, limit uint64, ...) ([]ChallengeData, error)
- func (client *Client) PurchaseTestcaseData(contest string, challengeId int64, submissionId int64, testcaseId int64) (int64, error)
- func (client *Client) Submit(filters provider.Filters, lang provider.Lang, code string) (provider.SubmissionReport, error)
- type Status
- type SubmissionState
- type SubmitRequest
- type TestcaseData
- type Track
Constants ¶
View Source
const ( Accepted Status = "Accepted" Success = "Success" Processing = "Processing" CompilationError = "Compilation error" RuntimeError = "Runtime Error" TimeoutError = "Terminated due to timeout" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChallengeData ¶
type ChallengeData struct { Solved bool `json:"solved"` Attempted bool `json:"attempted"` ContestSlug string `json:"contest_slug"` Slug string `json:"slug"` Name string `json:"name"` Preview string `json:"preview"` Category string `json:"category"` BodyHtml string `json:"body_html"` Languages []string `json:"languages"` Track Track `json:"track"` MaxScore int64 `json:"max_score"` CTemplate string `json:"c_template"` CTemplateHead string `json:"c_template_head"` CTemplateTail string `json:"c_template_tail"` CppTemplate string `json:"cpp_template"` CppTemplateHead string `json:"cpp_template_head"` CppTemplateTail string `json:"cpp_template_tail"` JavaTemplate string `json:"java_template"` JavaTemplateHead string `json:"java_template_head"` JavaTemplateTail string `json:"java_template_tail"` CsharpTemplate string `json:"csharp_template"` CsharpTemplateHead string `json:"csharp_template_head"` CsharpTemplateTail string `json:"csharp_template_tail"` PhpTemplate string `json:"php_template"` PhpTemplateHead string `json:"php_template_head"` PhpTemplateTail string `json:"php_template_tail"` RubyTemplate string `json:"ruby_template"` RubyTemplateHead string `json:"ruby_template_head"` RubyTemplateTail string `json:"ruby_template_tail"` PythonTemplate string `json:"python_template"` PythonTemplateHead string `json:"python_template_head"` PythonTemplateTail string `json:"python_template_tail"` PerlTemplate string `json:"perl_template"` PerlTemplateHead string `json:"perl_template_head"` PerlTemplateTail string `json:"perl_template_tail"` HaskellTemplate string `json:"haskell_template"` HaskellTemplateHead string `json:"haskell_template_head"` HaskellTemplateTail string `json:"haskell_template_tail"` ClojureTemplate string `json:"clojure_template"` ClojureTemplateHead string `json:"clojure_template_head"` ClojureTemplateTail string `json:"clojure_template_tail"` ScalaTemplate string `json:"scala_template"` ScalaTemplateHead string `json:"scala_template_head"` ScalaTemplateTail string `json:"scala_template_tail"` LuaTemplate string `json:"lua_template"` LuaTemplateHead string `json:"lua_template_head"` LuaTemplateTail string `json:"lua_template_tail"` ErlangTemplate string `json:"erlang_template"` ErlangTemplateHead string `json:"erlang_template_head"` ErlangTemplateTail string `json:"erlang_template_tail"` JavascriptTemplate string `json:"javascript_template"` JavascriptTemplateHead string `json:"javascript_template_head"` JavascriptTemplateTail string `json:"javascript_template_tail"` TypescriptTemplate string `json:"typescript_template"` TypescriptTemplateHead string `json:"typescript_template_head"` TypescriptTemplateTail string `json:"typescript_template_tail"` GoTemplate string `json:"go_template"` GoTemplateHead string `json:"go_template_head"` GoTemplateTail string `json:"go_template_tail"` Python3Template string `json:"python3_template"` Python3TemplateHead string `json:"python3_template_head"` Python3TemplateTail string `json:"python3_template_tail"` ObjectivecTemplate string `json:"objectivec_template"` ObjectivecTemplateHead string `json:"objectivec_template_head"` ObjectivecTemplateTail string `json:"objectivec_template_tail"` Java8Template string `json:"java8_template"` Java8TemplateHead string `json:"java8_template_head"` Java8TemplateTail string `json:"java8_template_tail"` SwiftTemplate string `json:"swift_template"` SwiftTemplateHead string `json:"swift_template_head"` SwiftTemplateTail string `json:"swift_template_tail"` Cpp14Template string `json:"cpp14_template"` Cpp14TemplateHead string `json:"cpp14_template_head"` Cpp14TemplateTail string `json:"cpp14_template_tail"` PypyTemplate string `json:"pypy_template"` PypyTemplateHead string `json:"pypy_template_head"` PypyTemplateTail string `json:"pypy_template_tail"` Pypy3Template string `json:"pypy3_template"` Pypy3TemplateHead string `json:"pypy3_template_head"` Pypy3TemplateTail string `json:"pypy3_template_tail"` KotlinTemplate string `json:"kotlin_template"` KotlinTemplateHead string `json:"kotlin_template_head"` KotlinTemplateTail string `json:"kotlin_template_tail"` Java15Template string `json:"java15_template"` Java15TemplateHead string `json:"java15_template_head"` Java15TemplateTail string `json:"java15_template_tail"` }
func (*ChallengeData) Identify ¶
func (data *ChallengeData) Identify() provider.Filters
func (*ChallengeData) Prompt ¶
func (data *ChallengeData) Prompt() string
type Client ¶
type Client struct { DoPurchase bool // optional // contains filtered or unexported fields }
func (*Client) FindNextChallenge ¶
func (*Client) GetChallenge ¶
func (*Client) GetChallengeData ¶
func (client *Client) GetChallengeData(contest string, challenge string) (*ChallengeData, error)
func (*Client) GetTestcaseData ¶
func (*Client) GetUnlockedTestcases ¶
func (*Client) HasUnlockedTestcase ¶
func (*Client) IsSignedIn ¶
func (*Client) ListChallenges ¶
func (*Client) PurchaseTestcaseData ¶
type SubmissionState ¶
type SubmissionState struct { Id int64 `json:"id"` ContestId int64 `json:"contest_id"` ChallengeId int64 `json:"challenge_id"` Language string `json:"language"` Status Status `json:"status"` ChallengeSlug string `json:"challenge_slug"` ContestSlug string `json:"contest_slug"` CompileStatus int64 `json:"compile_status"` CompileMessage string `json:"compile_message"` TestcaseStatus []int64 `json:"testcase_status"` TestcaseMessage []string `json:"testcase_message"` CodecheckerTime []float64 `json:"codecheck_time"` CodecheckerSignal []int64 `json:"codechecker_signal"` IndividualTestcaseScore []float64 `json:"individual_test_case_score"` DisplayScore string `json:"display_score"` // contains filtered or unexported fields }
func (*SubmissionState) ErrorReport ¶
func (state *SubmissionState) ErrorReport() *provider.ErrorReport
func (*SubmissionState) HasSucceeded ¶
func (state *SubmissionState) HasSucceeded() bool
func (*SubmissionState) Identify ¶
func (state *SubmissionState) Identify() string
func (*SubmissionState) IsDone ¶
func (state *SubmissionState) IsDone() bool
func (*SubmissionState) Statistics ¶
func (state *SubmissionState) Statistics() provider.SubmissionStatistics
type SubmitRequest ¶
type TestcaseData ¶
Click to show internal directories.
Click to hide internal directories.