Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrManagerialAccessIsDenied = errors.New("managerial access is denied") ErrUserIsDisabled = errors.New("user is disabled") ErrFailedPasswordChecking = errors.New("failed password checking") ErrFailedTokenChecking = errors.New("failed token checking") ErrUnableToFormatCode = errors.New("unable to format the code") ErrNotFound = errors.New("not found") )
...
Functions ¶
This section is empty.
Types ¶
type AccessTokenClaims ¶ added in v1.5.1
type AccessTokenClaims struct {
jwt.StandardClaims
User User
}
AccessTokenClaims ...
type Pagination ¶ added in v1.5.1
Pagination ...
type Solution ¶
type Solution struct {
gorm.Model
UserID uint `minimum:"1"`
User User
TaskID uint `minimum:"1"`
Task Task
Code string
IsCorrect bool
Result datatypes.JSON `swaggertype:"object"`
}
Solution ...
func (*Solution) FormatCode ¶ added in v1.5.1
FormatCode ...
type SolutionGetter ¶
SolutionGetter ...
type SolutionGroup ¶ added in v1.5.1
SolutionGroup ...
type SolutionRegister ¶
type SolutionRegister interface {
RegisterSolution(id uint)
}
SolutionRegister ...
type Task ¶
type Task struct {
gorm.Model
UserID uint `minimum:"1"`
User User
Title string
Description string
BoilerplateCode string
TestCases datatypes.JSON `swaggertype:"object"`
Status int `gorm:"->" enums:"0,1,2"`
}
Task ...
func (*Task) FormatBoilerplateCode ¶ added in v1.5.1
FormatBoilerplateCode ...
type TaskGetter ¶
TaskGetter ...
type User ¶ added in v1.5.1
type User struct {
gorm.Model
Username string `gorm:"unique"`
Password string `gorm:"-"`
PasswordHash string
IsDisabled *bool
}
User ...
func (User) CheckPassword ¶ added in v1.5.1
CheckPassword ...
func (*User) GeneratePassword ¶ added in v1.7.1
GeneratePassword ...
func (*User) HashPassword ¶ added in v1.5.1
HashPassword ...
Click to show internal directories.
Click to hide internal directories.