Documentation ¶
Index ¶
- Variables
- type AddTagOption
- type CreateProblemOption
- type DatasetOption
- type DiscussionOption
- type ProblemUserRelation
- type RenewTokenResponse
- type RequestedUser
- type ShareProblemOption
- type SolutionOption
- type SolutionResponse
- type UpdateProblemOption
- type UserLoginRequest
- type UserLoginResponse
- type UserRegisterRequest
- type UserResponse
- type UserUpdatePasswordRequest
- type UserUpdateRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UserSuccessfulRegistrationResponse = struct { Message string `json:"message"` }{ Message: "Account registered successfully. Please verify your email to add the email to your profile.", } EmailSuccessfulVerificationResponse = struct { Message string `json:"message"` }{ Message: "Email verified successfully.", } )
Functions ¶
This section is empty.
Types ¶
type AddTagOption ¶
type AddTagOption struct {
TagName string `json:"tagName"`
}
type CreateProblemOption ¶
type CreateProblemOption struct {
Title string `json:"title" validate:"required"`
}
type DatasetOption ¶
type DatasetOption struct { Title string `json:"title"` Weight int64 `json:"weight"` IsSample bool `json:"isSample"` }
func (*DatasetOption) NewModelDatasetFormat ¶
func (d *DatasetOption) NewModelDatasetFormat(inputFile, outputFile *multipart.FileHeader, pid, userid uint) (*models.Dataset, error)
type DiscussionOption ¶
type DiscussionOption struct {
Message string `json:"message"`
}
type ProblemUserRelation ¶
type ProblemUserRelation struct { Username string `json:"username"` Role models.PermitType `json:"role"` ProblemID uint `json:"problemID"` }
func NewProblemUserRelation ¶
func NewProblemUserRelation(problemShare *models.ProblemShare) *ProblemUserRelation
type RenewTokenResponse ¶
type RenewTokenResponse struct { User *UserResponse `json:"user"` AccessToken string `json:"accessToken"` AccessTokenExpiresAt time.Time `json:"accessTokenExpiresAt"` }
func NewRenewTokenResponse ¶
func NewRenewTokenResponse(u *models.User, accessTokenInfo *token.TokenInfo) *RenewTokenResponse
type RequestedUser ¶
type ShareProblemOption ¶
type ShareProblemOption struct {}
type SolutionOption ¶
type SolutionResponse ¶
type SolutionResponse struct { ID uint `json:"ID"` Code string `json:"code"` Language string `json:"language"` LastExecuted *time.Time `json:"lastExecuted,omitempty"` TimeTaken *float64 `json:"timeTaken,omitempty"` MemoryTaken *float64 `json:"memoryTaken,omitempty"` ProblemUserRelation *ProblemUserRelation `json:"problemUserRelation"` }
func NewSolutionResponse ¶
func NewSolutionResponse(solution *models.ProblemSolution, problemShare *models.ProblemShare) *SolutionResponse
type UpdateProblemOption ¶
type UpdateProblemOption struct { TimeLimit float64 `json:"timeLimit"` MemoryLimit float64 `json:"memoryLimit"` Statement string `json:"statement"` InputStatement string `json:"inputStatement"` OutputStatement string `json:"outputStatement"` NoteStatement string `json:"noteStatement"` StatementsVisibilityDuringContest bool `json:"statementsVisibilityDuringContest"` CheckerType models.CheckerType `json:"checkerType"` }
func (*UpdateProblemOption) UpdateProblemModelFormat ¶
type UserLoginRequest ¶
type UserLoginResponse ¶
type UserLoginResponse struct { User *UserResponse `json:"User"` AccessToken string `json:"AccessToken"` AccessTokenExpiresAt time.Time `json:"AccessTokenExpiresAt"` RefreshToken string `json:"RefreshToken"` RefreshTokenExpiresAt time.Time `json:"RefreshTokenExpiresAt"` }
func NewLoginResponse ¶
func NewLoginResponse(u *models.User, accessTokenInfo, refreshTokenInfo *token.TokenInfo) *UserLoginResponse
type UserRegisterRequest ¶
type UserResponse ¶
type UserResponse struct { ID uint `json:"id"` Username string `json:"username"` Email string `json:"email"` DisplayName string `json:"displayName"` Organization string `json:"organization"` Country string `json:"country"` City string `json:"city"` Image string `json:"image"` }
func NewUserResponse ¶
func NewUserResponse(u *models.User) *UserResponse
Click to show internal directories.
Click to hide internal directories.