Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginRequest ¶
func (LoginRequest) Validate ¶
func (data LoginRequest) Validate() error
type Problem ¶
type Problem struct { Id uint64 `json:"id"` CreatedAt *time.Time `json:"createdAt" db:"created_at"` Name string `json:"name"` Description string `json:"description"` ShortDescription string `json:"shortDescription" db:"short_description"` AuthorId uint64 `json:"authorId" db:"author_id"` Visible bool `json:"visible"` Difficulty ProblemDifficulty `json:"difficulty"` Grade ProblemGrade `json:"grade"` TimeLimit float64 `json:"timeLimit" db:"time_limit"` MemoryLimit int `json:"memoryLimit" db:"memory_limit"` StackLimit int `json:"stackLimit" db:"stack_limit"` SourceSize int `json:"sourceSize" db:"source_size"` }
type ProblemDifficulty ¶
type ProblemDifficulty string
const ( Easy ProblemDifficulty = "easy" Medium ProblemDifficulty = "medium" Hard ProblemDifficulty = "hard" Contest ProblemDifficulty = "contest" )
type ProblemGrade ¶
type ProblemGrade string
ex. clasa a 9, clasa a 10 etc
const ( NINE ProblemGrade = "9" TEN ProblemGrade = "10" ELEVEN ProblemGrade = "11" )
type SignupRequest ¶
type SignupRequest struct { Username string `json:"username"` Email string `json:"email"` Password string `json:"password"` }
func (SignupRequest) Validate ¶
func (data SignupRequest) Validate() error
type User ¶
type User struct { Id uint64 `json:"id"` CreatedAt *time.Time `json:"createdAt" db:"created_at"` Username string `json:"username"` Email string `json:"email"` Password string `json:"-"` Bio string `json:"bio"` Visible bool `json:"visible"` IsAdmin bool `json:"isAdmin" db:"is_admin"` IsProposer bool `json:"isProposer" db:"is_proposer"` IsBanned bool `json:"isBanned" db:"is_banned"` VerifiedEmail bool `json:"verifiedEmail" db:"verified_email"` EmailVerificationSentAt *time.Time `json:"emailVerificationSentAt" db:"email_verification_sent_at"` }
User represents a user entity
Click to show internal directories.
Click to hide internal directories.