Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { SetHostUrl(hostUrl string) SetCookieJar(Jar http.CookieJar) NewAccountAPI() AccountAPI NewVolumeAPI() VolumeAPI NewJudgementAPI() JudgementAPI NewSubmissionAPI() SubmissionAPI NewProblemAPI() ProblemAPI }
type AccountAPI ¶
type AccountAPI interface { Create(username, password, email string) (*models.Account, error) Login(username, password string) error ResetCredential(username, oldPassword, newPassword string) error Test() (*models.Account, error) }
func NewAccountAPI ¶
func NewAccountAPI(client *resty.Client) AccountAPI
type JudgementAPI ¶
type JudgementAPI interface { Create(programId, submissionId uint64) (*models.Judgement, error) QueryJudgements() ([]*models.Judgement, error) QueryJudgement(judgementId string) (*models.Judgement, error) CancelJudgement(judgementId string) (*models.Judgement, error) }
func NewJudgementAPI ¶
func NewJudgementAPI(client *resty.Client) JudgementAPI
type ProblemAPI ¶
type ProblemAPI interface { //CreateProblem() ) //GetProblems(c *gin.Context) GetProblem(problemName string) (*models.Problem, error) }
func NewProblemAPI ¶
func NewProblemAPI(client *resty.Client) ProblemAPI
type SubmissionAPI ¶
type SubmissionAPI interface {
Create(problemId, volume string) (int, *models.Submission, *models.Judgement, error)
}
func NewSubmissionAPI ¶
func NewSubmissionAPI(client *resty.Client) SubmissionAPI
type VolumeAPI ¶
type VolumeAPI interface { CreateVolume() (*models.Volume, error) CreateDirectory(volumeName, directory string) (*models.Volume, error) CreateFile(volumeName, filename string, file []byte) (*models.Volume, error) DownloadVolume(volumeName, directory string) ([]byte, error) }
func NewVolumeAPI ¶
func NewVolumeAPI(client *resty.Client) VolumeAPI
Click to show internal directories.
Click to hide internal directories.