Documentation ¶
Index ¶
- func AddProblemsToSet(c echo.Context) error
- func AddStudents(c echo.Context) error
- func AdminCreateUser(c echo.Context) error
- func AdminDeleteUser(c echo.Context) error
- func AdminGetLogs(c echo.Context) error
- func AdminGetUser(c echo.Context) error
- func AdminGetUsers(c echo.Context) error
- func AdminUpdateUser(c echo.Context) error
- func BeginLogin(c echo.Context) error
- func BeginRegistration(c echo.Context) error
- func ChangePassword(c echo.Context) error
- func CloneProblemSet(c echo.Context) error
- func CreateClass(c echo.Context) error
- func CreateImage(c echo.Context) error
- func CreateProblem(c echo.Context) error
- func CreateProblemSet(c echo.Context) error
- func CreateSubmission(c echo.Context) error
- func CreateTestCase(c echo.Context) error
- func DeleteClass(c echo.Context) error
- func DeleteProblem(c echo.Context) error
- func DeleteProblemSet(c echo.Context) error
- func DeleteProblemsFromSet(c echo.Context) error
- func DeleteStudents(c echo.Context) error
- func DeleteTestCase(c echo.Context) error
- func DeleteTestCases(c echo.Context) error
- func DoResetPassword(c echo.Context) error
- func EmailRegistered(c echo.Context) error
- func FinishLogin(c echo.Context) error
- func FinishRegistration(c echo.Context) error
- func GetClass(c echo.Context) error
- func GetClassesIManage(c echo.Context) error
- func GetClassesITake(c echo.Context) error
- func GetGrades(c echo.Context) error
- func GetImage(c echo.Context) error
- func GetMe(c echo.Context) error
- func GetProblem(c echo.Context) error
- func GetProblemAttachmentFile(c echo.Context) error
- func GetProblemSet(c echo.Context) error
- func GetProblemSetProblem(c echo.Context) error
- func GetProblemSetProblemInputFile(c echo.Context) error
- func GetProblemSetProblemOutputFile(c echo.Context) error
- func GetProblems(c echo.Context) error
- func GetRandomProblem(c echo.Context) error
- func GetRunComparerOutput(c echo.Context) error
- func GetRunCompilerOutput(c echo.Context) error
- func GetRunInput(c echo.Context) error
- func GetRunOutput(c echo.Context) error
- func GetScript(c echo.Context) error
- func GetSubmission(c echo.Context) error
- func GetSubmissionCode(c echo.Context) error
- func GetSubmissions(c echo.Context) error
- func GetTask(c echo.Context) error
- func GetTestCaseInputFile(c echo.Context) error
- func GetTestCaseOutputFile(c echo.Context) error
- func GetUser(c echo.Context) error
- func GetUserProblemInfo(c echo.Context) error
- func GetUsers(c echo.Context) error
- func JoinClass(c echo.Context) error
- func Login(c echo.Context) error
- func ProblemSetCreateSubmission(c echo.Context) error
- func ProblemSetGetRunComparerOutput(c echo.Context) error
- func ProblemSetGetRunCompilerOutput(c echo.Context) error
- func ProblemSetGetRunInput(c echo.Context) error
- func ProblemSetGetRunOutput(c echo.Context) error
- func ProblemSetGetSubmission(c echo.Context) error
- func ProblemSetGetSubmissionCode(c echo.Context) error
- func ProblemSetGetSubmissions(c echo.Context) error
- func RefreshGrades(c echo.Context) error
- func RefreshInviteCode(c echo.Context) error
- func Register(c echo.Context) error
- func RequestResetPassword(c echo.Context) error
- func ResendEmailVerification(c echo.Context) error
- func Todo(c echo.Context) error
- func UpdateClass(c echo.Context) error
- func UpdateEmail(c echo.Context) error
- func UpdateMe(c echo.Context) error
- func UpdateProblem(c echo.Context) error
- func UpdateProblemSet(c echo.Context) error
- func UpdateRun(c echo.Context) error
- func UpdateTestCase(c echo.Context) error
- func VerifyEmail(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddProblemsToSet ¶
func AddProblemsToSet(c echo.Context) error
func AddStudents ¶
func AddStudents(c echo.Context) error
func AdminCreateUser ¶
func AdminCreateUser(c echo.Context) error
func AdminDeleteUser ¶
func AdminDeleteUser(c echo.Context) error
func AdminGetLogs ¶
func AdminGetLogs(c echo.Context) error
func AdminGetUser ¶
func AdminGetUser(c echo.Context) error
func AdminGetUsers ¶
func AdminGetUsers(c echo.Context) error
func AdminUpdateUser ¶
func AdminUpdateUser(c echo.Context) error
func BeginLogin ¶
func BeginLogin(c echo.Context) error
func BeginRegistration ¶
func BeginRegistration(c echo.Context) error
func ChangePassword ¶
func ChangePassword(c echo.Context) error
func CloneProblemSet ¶
func CloneProblemSet(c echo.Context) error
func CreateClass ¶
func CreateClass(c echo.Context) error
func CreateImage ¶
func CreateImage(c echo.Context) error
func CreateProblem ¶
func CreateProblem(c echo.Context) error
func CreateProblemSet ¶
func CreateProblemSet(c echo.Context) error
func CreateSubmission ¶
func CreateSubmission(c echo.Context) error
func CreateTestCase ¶
func CreateTestCase(c echo.Context) error
func DeleteClass ¶
func DeleteClass(c echo.Context) error
func DeleteProblem ¶
func DeleteProblem(c echo.Context) error
func DeleteProblemSet ¶
func DeleteProblemSet(c echo.Context) error
func DeleteProblemsFromSet ¶
func DeleteProblemsFromSet(c echo.Context) error
func DeleteStudents ¶
func DeleteStudents(c echo.Context) error
func DeleteTestCase ¶
func DeleteTestCase(c echo.Context) error
func DeleteTestCases ¶
func DeleteTestCases(c echo.Context) error
func DoResetPassword ¶
func DoResetPassword(c echo.Context) error
@summary Do a password reset. @description Do a password reset by email or username. Will check the if the given code is valid, then reset @description the password, logging out all sessions. @router /auth/password_reset [PUT] @produce json @tags Auth @param request body request.DoResetPasswordRequest true "username or email" @success 200 {object} response.EmailVerificationResponse "email sent" @failure 400 {object} response.Response{data=[]response.ValidationError} "Validation error" @success 403 {object} response.Response "invalid token, with message `WRONG_CODE`" @success 408 {object} response.Response "the verification code is expired, with message `CODE_EXPIRED`" @success 408 {object} response.Response "the verification code is used, with message `CODE_USED`" @success 404 {object} response.Response "user not found, with message `NOT_FOUND`" @security ApiKeyAuth
func EmailRegistered ¶
func EmailRegistered(c echo.Context) error
@summary EmailRegistered returns if an email is registered. @Description EmailRegistered returns if an email is registered. It is mainly used for client side validation. @router /auth/email_registered [GET] @produce json @tags Auth @param email query string true "The email registered request." @success 200 {object} response.Response "Email unregistered, with message `SUCCESS`" @failure 500 {object} response.Response @failure 400 {object} response.Response{data=[]response.ValidationError} "Validation error" @failure 409 {object} response.Response "Email registered, with message `CONFLICT_EMAIL`"
func FinishLogin ¶
func FinishLogin(c echo.Context) error
func FinishRegistration ¶
func FinishRegistration(c echo.Context) error
func GetClassesIManage ¶
func GetClassesIManage(c echo.Context) error
func GetClassesITake ¶
func GetClassesITake(c echo.Context) error
func GetMe ¶
func GetMe(c echo.Context) error
@summary Get current user's information. @description Get current user's information. @router /user/me [GET] @produce json @tags Auth @success 200 {object} response.GetMeResponse @failure 500 {object} response.Response @security ApiKeyAuth
func GetProblem ¶
func GetProblem(c echo.Context) error
func GetProblemAttachmentFile ¶
func GetProblemAttachmentFile(c echo.Context) error
func GetProblemSet ¶
func GetProblemSet(c echo.Context) error
func GetProblemSetProblem ¶
func GetProblemSetProblem(c echo.Context) error
func GetProblemSetProblemInputFile ¶
func GetProblemSetProblemInputFile(c echo.Context) error
func GetProblemSetProblemOutputFile ¶
func GetProblemSetProblemOutputFile(c echo.Context) error
func GetProblems ¶
func GetProblems(c echo.Context) error
func GetRandomProblem ¶
func GetRandomProblem(c echo.Context) error
func GetRunComparerOutput ¶
func GetRunComparerOutput(c echo.Context) error
func GetRunCompilerOutput ¶
func GetRunCompilerOutput(c echo.Context) error
func GetRunInput ¶
func GetRunInput(c echo.Context) error
func GetRunOutput ¶
func GetRunOutput(c echo.Context) error
func GetSubmission ¶
func GetSubmission(c echo.Context) error
func GetSubmissionCode ¶
func GetSubmissionCode(c echo.Context) error
func GetSubmissions ¶
func GetSubmissions(c echo.Context) error
func GetTestCaseInputFile ¶
func GetTestCaseInputFile(c echo.Context) error
func GetTestCaseOutputFile ¶
func GetTestCaseOutputFile(c echo.Context) error
func GetUser ¶
func GetUser(c echo.Context) error
@summary Get specific user's information. @description Get a specific user's basic information by user id or username. @description If a user's username happens to be another's id, this API will find the user by ID. @router /user/{id} [GET] @produce json @tags Auth @success 200 {object} response.GetUserResponse @success 404 {object} response.Response "user not found, with message `NOT_FOUND`" @failure 500 {object} response.Response @security ApiKeyAuth
func GetUserProblemInfo ¶
func GetUserProblemInfo(c echo.Context) error
func Login ¶
func Login(c echo.Context) error
@summary Login into an account using email/username and password. @description Login into an account using email/username and password. A token will be returned, together with the @description user's personal data. @router /auth/login [POST] @produce json @tags Auth @param request body request.LoginRequest true "The login request." @success 200 {object} response.LoginResponse @failure 500 {object} response.Response @failure 400 {object} response.Response{data=[]response.ValidationError} "Validation error" @failure 404 {object} response.Response "Wrong username, with message `WRONG_USERNAME`" @failure 403 {object} response.Response "Wrong password, with message `WRONG_PASSWORD`"
func ProblemSetCreateSubmission ¶
func ProblemSetCreateSubmission(c echo.Context) error
func ProblemSetGetRunComparerOutput ¶
func ProblemSetGetRunComparerOutput(c echo.Context) error
func ProblemSetGetRunCompilerOutput ¶
func ProblemSetGetRunCompilerOutput(c echo.Context) error
func ProblemSetGetRunInput ¶
func ProblemSetGetRunInput(c echo.Context) error
func ProblemSetGetRunOutput ¶
func ProblemSetGetRunOutput(c echo.Context) error
func ProblemSetGetSubmission ¶
func ProblemSetGetSubmission(c echo.Context) error
func ProblemSetGetSubmissionCode ¶
func ProblemSetGetSubmissionCode(c echo.Context) error
func ProblemSetGetSubmissions ¶
func ProblemSetGetSubmissions(c echo.Context) error
func RefreshGrades ¶
func RefreshGrades(c echo.Context) error
func RefreshInviteCode ¶
func RefreshInviteCode(c echo.Context) error
func Register ¶
func Register(c echo.Context) error
@summary Register an account, and login into that account. @description Register an account, and login into that account. A token will be returned, together with the @description user's personal data. @router /auth/register [POST] @produce json @tags Auth @param request body request.RegisterRequest true "The register request." @success 201 {object} response.RegisterResponse @failure 500 {object} response.Response @failure 400 {object} response.Response{data=[]response.ValidationError} "Validation error" @failure 409 {object} response.Response "Email registered, with message `CONFLICT_EMAIL`" @failure 409 {object} response.Response "Username registered, with message `WRONG_PASSWORD`"
func RequestResetPassword ¶
func RequestResetPassword(c echo.Context) error
@summary Request a password reset. @description Request a password reset by email or username. Will check for if the user's email is @description verified, then send an email with a token to reset the password. The token will be valid @description for 30 minitues. @router /auth/password_reset [POST] @produce json @tags Auth @param request body request.RequestResetPasswordRequest true "username or email" @success 200 {object} response.RequestResetPasswordResponse "email sent" @failure 400 {object} response.Response{data=[]response.ValidationError} "Validation error" @success 404 {object} response.Response "user not found, with message `NOT_FOUND`" @failure 406 {object} response.Response "Email not verified, with message `EMAIL_NOT_VERIFIED`" @security ApiKeyAuth
func ResendEmailVerification ¶
func ResendEmailVerification(c echo.Context) error
@summary Resend a verification email. @description Resend a verification email. Will check for if the user's email is already @description verified, then send an email with a token to verify the email. The token will be valid @description for 30 minitues. @router /user/resend_email_verification [POST] @produce json @tags Auth @success 200 {object} response.ResendEmailVerificationResponse "email sent" @failure 406 {object} response.Response "Email verified, with message `EMAIL_VERIFIED`" @security ApiKeyAuth
func UpdateClass ¶
func UpdateClass(c echo.Context) error
func UpdateEmail ¶
func UpdateEmail(c echo.Context) error
@summary Update current user's email if not verified. @description Change current user's email only if the email is not verified. @description The new email can not be the same as other users'. @router /user/update_email [PUT] @produce json @tags Auth @param request body request.UpdateEmailRequest true "New email" @success 200 {object} response.UpdateEmailResponse @failure 406 {object} response.Response "Email verified, with message `EMAIL_VERIFIED`" @failure 409 {object} response.Response "New email confilct, with message `CONFLICT_EMAIL`" @security ApiKeyAuth
func UpdateProblem ¶
func UpdateProblem(c echo.Context) error
func UpdateProblemSet ¶
func UpdateProblemSet(c echo.Context) error
func UpdateTestCase ¶
func UpdateTestCase(c echo.Context) error
func VerifyEmail ¶
func VerifyEmail(c echo.Context) error
@summary Verify a user's email. @description Verify a user's email. Will check for if the user's email is @description verified, then send an email with a token to verify The token will be valid @description for 30 minitues. @router /user/email_verification [POST] @produce json @tags Auth @param request body request.VerifyEmailRequest true "token" @success 200 {object} response.EmailVerificationResponse "email sent" @failure 400 {object} response.Response{data=[]response.ValidationError} "Validation error" @success 403 {object} response.Response "invalid token, with message `WRONG_CODE`" @success 408 {object} response.Response "the verification code is expired, with message `CODE_EXPIRED`" @success 408 {object} response.Response "the verification code is used, with message `CODE_USED`" @success 404 {object} response.Response "user not found, with message `NOT_FOUND`" @security ApiKeyAuth
Types ¶
This section is empty.