Documentation
¶
Index ¶
- Constants
- type API
- type Account
- type AccountRole
- type AccountSetting
- type CreateAccountRequest
- type CreateAccountResponse
- type CreateProblemRequest
- type CreateProblemResponse
- type CreateSessionRequest
- type CreateSessionResponse
- type CreateSubmissionRequest
- type CreateSubmissionResponse
- type CreateTestCaseListRequest
- type CreateTestCaseListResponse
- type CreateTestCaseRequest
- type CreateTestCaseResponse
- type DeleteProblemRequest
- type DeleteProblemResponse
- type DeleteSessionRequest
- type DeleteSessionResponse
- type DeleteSubmissionRequest
- type DeleteSubmissionResponse
- type DeleteTestCaseRequest
- type DeleteTestCaseResponse
- type ErrorCode
- type GetAccountListRequest
- type GetAccountListResponse
- type GetAccountProblemSnippetListRequest
- type GetAccountProblemSnippetListResponse
- type GetAccountProblemSubmissionSnippetListRequest
- type GetAccountProblemSubmissionSnippetListResponse
- type GetAccountRequest
- type GetAccountResponse
- type GetAccountSubmissionSnippetListRequest
- type GetAccountSubmissionSnippetListResponse
- type GetAndUpdateFirstSubmittedSubmissionToExecutingRequest
- type GetAndUpdateFirstSubmittedSubmissionToExecutingResponse
- type GetProblemRequest
- type GetProblemResponse
- type GetProblemSnippetListRequest
- type GetProblemSnippetListResponse
- type GetProblemSubmissionSnippetListRequest
- type GetProblemSubmissionSnippetListResponse
- type GetProblemTestCaseSnippetListRequest
- type GetProblemTestCaseSnippetListResponse
- type GetServerInfoRequest
- type GetServerInfoResponse
- type GetSessionRequest
- type GetSessionResponse
- type GetSubmissionRequest
- type GetSubmissionResponse
- type GetSubmissionSnippetListRequest
- type GetSubmissionSnippetListResponse
- type GetTestCaseRequest
- type GetTestCaseResponse
- type Language
- type Problem
- type ProblemExample
- type ProblemSetting
- type ProblemSnippet
- type Setting
- type Submission
- type SubmissionProblemSnippet
- type SubmissionResult
- type SubmissionSetting
- type SubmissionSnippet
- type SubmissionStatus
- type TestCase
- type TestCaseSnippet
- type UpdateAccountRequest
- type UpdateAccountResponse
- type UpdateProblemRequest
- type UpdateProblemResponse
- type UpdateSettingRequest
- type UpdateSettingResponse
- type UpdateSubmissionRequest
- type UpdateSubmissionResponse
- type UpdateTestCaseRequest
- type UpdateTestCaseResponse
Constants ¶
View Source
const ( SubmissionStatusSubmitted SubmissionStatus = 1 SubmissionStatusExecuting SubmissionStatus = 2 SubmissionStatusFinished SubmissionStatus = 3 SubmissionResultOK SubmissionResult = 1 SubmissionResultCompileError SubmissionResult = 2 SubmissionResultRuntimeError SubmissionResult = 3 SubmissionResultTimeLimitExceeded SubmissionResult = 4 SubmissionResultMemoryLimitExceed SubmissionResult = 5 SubmissionResultWrongAnswer SubmissionResult = 6 SubmissionResultUnsupportedLanguage SubmissionResult = 7 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { GetServerInfo(GetServerInfoRequest) GetServerInfoResponse CreateAccount(CreateAccountRequest) CreateAccountResponse GetAccountList(GetAccountListRequest) GetAccountListResponse GetAccount(GetAccountRequest) GetAccountResponse UpdateAccount(UpdateAccountRequest) UpdateAccountResponse CreateSession(CreateSessionRequest) CreateSessionResponse GetSession(GetSessionRequest) GetSessionResponse DeleteSession(DeleteSessionRequest) DeleteSessionResponse CreateProblem(CreateProblemRequest) CreateProblemResponse GetProblemSnippetList(GetProblemSnippetListRequest) GetProblemSnippetListResponse GetProblem(GetProblemRequest) GetProblemResponse UpdateProblem(UpdateProblemRequest) UpdateProblemResponse DeleteProblem(DeleteProblemRequest) DeleteProblemResponse CreateTestCase(CreateTestCaseRequest) CreateTestCaseResponse CreateTestCaseList(CreateTestCaseListRequest) CreateTestCaseListResponse GetProblemTestCaseSnippetList(GetProblemTestCaseSnippetListRequest) GetProblemTestCaseSnippetListResponse GetTestCase(GetTestCaseRequest) GetTestCaseResponse UpdateTestCase(UpdateTestCaseRequest) UpdateTestCaseResponse DeleteTestCase(DeleteTestCaseRequest) DeleteTestCaseResponse GetAccountProblemSnippetList(GetAccountProblemSnippetListRequest) GetAccountProblemSnippetListResponse CreateSubmission(CreateSubmissionRequest) CreateSubmissionResponse GetSubmissionSnippetList(GetSubmissionSnippetListRequest) GetSubmissionSnippetListResponse GetSubmission(GetSubmissionRequest) GetSubmissionResponse UpdateSubmission(UpdateSubmissionRequest) UpdateSubmissionResponse DeleteSubmission(DeleteSubmissionRequest) DeleteSubmissionResponse GetAccountSubmissionSnippetList(GetAccountSubmissionSnippetListRequest) GetAccountSubmissionSnippetListResponse GetProblemSubmissionSnippetList(GetProblemSubmissionSnippetListRequest) GetProblemSubmissionSnippetListResponse GetAccountProblemSubmissionSnippetList( GetAccountProblemSubmissionSnippetListRequest, ) GetAccountProblemSubmissionSnippetListResponse GetAndUpdateFirstSubmittedSubmissionToExecuting( GetAndUpdateFirstSubmittedSubmissionToExecutingRequest, ) GetAndUpdateFirstSubmittedSubmissionToExecutingResponse UpdateSetting(UpdateSettingRequest) UpdateSettingResponse }
type AccountRole ¶
type AccountRole string
const ( AccountRoleAdmin AccountRole = "admin" AccountRoleProblemSetter AccountRole = "problem_setter" AccountRoleContestant AccountRole = "contestant" AccountRoleWorker AccountRole = "worker" )
type AccountSetting ¶ added in v1.2.0
type AccountSetting struct { DisableAccountCreation bool `json:"DisableAccountCreation"` DisableAccountUpdate bool `json:"DisableAccountUpdate"` DisableSessionCreationForContestant bool `json:"DisableSessionCreationForContestant"` DisableSessionCreationForProblemSetter bool `json:"DisableSessionCreationForProblemSetter"` }
type CreateAccountRequest ¶
type CreateAccountResponse ¶
type CreateAccountResponse struct {
Account Account
}
type CreateProblemRequest ¶
type CreateProblemRequest struct { DisplayName string `validate:"min=1,max=256"` Description string `validate:"max=5000"` TimeLimitInMillisecond uint64 `validate:"max=10000"` MemoryLimitInByte uint64 `validate:"max=8589934592"` ExampleList []ProblemExample `validate:"max=5"` }
type CreateProblemResponse ¶
type CreateProblemResponse struct {
Problem Problem
}
type CreateSessionRequest ¶
type CreateSessionResponse ¶
type CreateSubmissionRequest ¶
type CreateSubmissionResponse ¶
type CreateSubmissionResponse struct {
SubmissionSnippet SubmissionSnippet
}
type CreateTestCaseListResponse ¶
type CreateTestCaseListResponse struct{}
type CreateTestCaseRequest ¶
type CreateTestCaseResponse ¶
type CreateTestCaseResponse struct {
TestCaseSnippet TestCaseSnippet
}
type DeleteProblemRequest ¶
type DeleteProblemRequest struct {
UUID string
}
type DeleteProblemResponse ¶
type DeleteProblemResponse struct{}
type DeleteSessionRequest ¶
type DeleteSessionRequest struct{}
type DeleteSessionResponse ¶
type DeleteSessionResponse struct{}
type DeleteSubmissionRequest ¶
type DeleteSubmissionRequest struct {
ID uint64
}
type DeleteSubmissionResponse ¶
type DeleteSubmissionResponse struct{}
type DeleteTestCaseRequest ¶
type DeleteTestCaseRequest struct {
UUID string
}
type DeleteTestCaseResponse ¶
type DeleteTestCaseResponse struct{}
type ErrorCode ¶
type ErrorCode int
const ( ErrorCodeOK ErrorCode = 1 ErrorCodeCanceled ErrorCode = 2 ErrorCodeUnknown ErrorCode = 3 ErrorCodeInvalidArgument ErrorCode = 4 ErrorCodeDeadlineExceeded ErrorCode = 5 ErrorCodeNotFound ErrorCode = 6 ErrorCodeAlreadyExists ErrorCode = 7 ErrorCodePermissionDenied ErrorCode = 8 ErrorCodeResourceExhausted ErrorCode = 9 ErrorCodeFailedPrecondition ErrorCode = 10 ErrorCodeAborted ErrorCode = 11 ErrorCodeOutOfRange ErrorCode = 12 ErrorCodeUnimplemented ErrorCode = 13 ErrorCodeInternal ErrorCode = 14 ErrorCodeDataLoss ErrorCode = 16 ErrorCodeUnauthenticated ErrorCode = 17 )
type GetAccountListRequest ¶
type GetAccountListResponse ¶
type GetAccountProblemSnippetListResponse ¶
type GetAccountProblemSnippetListResponse struct { TotalProblemCount uint64 ProblemSnippetList []ProblemSnippet }
type GetAccountProblemSubmissionSnippetListResponse ¶
type GetAccountProblemSubmissionSnippetListResponse struct { TotalSubmissionCount uint64 SubmissionSnippetList []SubmissionSnippet }
type GetAccountRequest ¶
type GetAccountRequest struct {
ID uint64
}
type GetAccountResponse ¶
type GetAccountResponse struct {
Account Account
}
type GetAccountSubmissionSnippetListResponse ¶
type GetAccountSubmissionSnippetListResponse struct { TotalSubmissionCount uint64 SubmissionSnippetList []SubmissionSnippet }
type GetAndUpdateFirstSubmittedSubmissionToExecutingRequest ¶
type GetAndUpdateFirstSubmittedSubmissionToExecutingRequest struct{}
type GetAndUpdateFirstSubmittedSubmissionToExecutingResponse ¶
type GetAndUpdateFirstSubmittedSubmissionToExecutingResponse struct {
Submission Submission
}
type GetProblemRequest ¶
type GetProblemRequest struct {
UUID string
}
type GetProblemResponse ¶
type GetProblemResponse struct {
Problem Problem
}
type GetProblemSnippetListResponse ¶
type GetProblemSnippetListResponse struct { TotalProblemCount uint64 ProblemSnippetList []ProblemSnippet }
type GetProblemSubmissionSnippetListResponse ¶
type GetProblemSubmissionSnippetListResponse struct { TotalSubmissionCount uint64 SubmissionSnippetList []SubmissionSnippet }
type GetProblemTestCaseSnippetListResponse ¶
type GetProblemTestCaseSnippetListResponse struct { TotalTestCaseCount uint64 TestCaseSnippetList []TestCaseSnippet }
type GetServerInfoRequest ¶
type GetServerInfoRequest struct{}
type GetServerInfoResponse ¶
type GetSessionRequest ¶
type GetSessionRequest struct{}
type GetSessionResponse ¶
type GetSessionResponse struct {
Account Account
}
type GetSubmissionRequest ¶
type GetSubmissionRequest struct {
ID uint64
}
type GetSubmissionResponse ¶
type GetSubmissionResponse struct {
Submission Submission
}
type GetSubmissionSnippetListResponse ¶
type GetSubmissionSnippetListResponse struct { TotalSubmissionCount uint64 SubmissionSnippetList []SubmissionSnippet }
type GetTestCaseRequest ¶
type GetTestCaseRequest struct {
UUID string
}
type GetTestCaseResponse ¶
type GetTestCaseResponse struct {
TestCase TestCase
}
type Problem ¶
type Problem struct { UUID string DisplayName string `validate:"min=1,max=256"` Author Account Description string `validate:"max=5000"` TimeLimitInMillisecond uint64 `validate:"max=10000"` MemoryLimitInByte uint64 `validate:"max=8589934592"` ExampleList []ProblemExample `validate:"max=5"` CreatedTime uint64 UpdatedTime uint64 TestCaseHash string }
type ProblemExample ¶
type ProblemSetting ¶ added in v1.2.0
type ProblemSnippet ¶
type Setting ¶ added in v1.2.0
type Setting struct { Account AccountSetting `json:"Account"` Problem ProblemSetting `json:"Problem"` Submission SubmissionSetting `json:"Submission"` }
type Submission ¶
type SubmissionResult ¶
type SubmissionResult uint8
type SubmissionSetting ¶ added in v1.2.0
type SubmissionSetting struct {
DisableSubmissionCreation bool `json:"DisableSubmissionCreation"`
}
type SubmissionSnippet ¶
type SubmissionStatus ¶
type SubmissionStatus uint8
type TestCaseSnippet ¶
type UpdateAccountRequest ¶
type UpdateAccountResponse ¶
type UpdateAccountResponse struct {
Account Account
}
type UpdateProblemRequest ¶
type UpdateProblemRequest struct { UUID string DisplayName *string `omitnil,validate:"min=1,max=256"` Description *string `omitnil,validate:"max=5000"` TimeLimitInMillisecond *uint64 `omitnil,validate:"max=10000"` MemoryLimitInByte *uint64 `omitnil,validate:"max=8589934592"` ExampleList *[]ProblemExample `omitnil,validate:"max=5"` }
type UpdateProblemResponse ¶
type UpdateProblemResponse struct {
Problem Problem
}
type UpdateSettingRequest ¶ added in v1.2.0
type UpdateSettingRequest struct {
Setting Setting
}
type UpdateSettingResponse ¶ added in v1.2.0
type UpdateSettingResponse struct {
Setting Setting
}
type UpdateSubmissionRequest ¶
type UpdateSubmissionResponse ¶
type UpdateSubmissionResponse struct {
SubmissionSnippet SubmissionSnippet
}
type UpdateTestCaseRequest ¶
type UpdateTestCaseResponse ¶
type UpdateTestCaseResponse struct {
TestCaseSnippet TestCaseSnippet
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.