Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChallenge ¶
func CreateTest ¶
func CreateUser ¶
func Init ¶
func Init(cfg *Configuration) error
func IsErrUserAlreadyExist ¶
Types ¶
type Challenge ¶
type Challenge struct { Id int64 `xorm:"pk autoincr"` Name string `xorm:"not null"` InternalName string `xorm:"unique not null"` Image string `json:"-"` // Docker image name TargetPath string `json:"-"` // Where file with been stored in container Cmd string `json:"-"` // Command to check answer. Can be null Inject string `json:"-"` Description string `json:"-"` Points int64 Created time.Time `xorm:"created"` }
func GetChallengeById ¶
func (*Challenge) UpdateWithInfoFrom ¶
type Configuration ¶
type Configuration struct {
LocalTestFiles string
}
type ErrUserAlreadyExist ¶
type ErrUserAlreadyExist struct {
// contains filtered or unexported fields
}
func (ErrUserAlreadyExist) Error ¶
func (e ErrUserAlreadyExist) Error() string
type Test ¶
type Test struct { Id int64 `xorm:"pk autoincr"` ChallengeId int64 `xorm:"notnull"` UserId int64 `xorm:"notnull"` IsSucess bool `xorm:"notnull"` Created time.Time `xorm:"notnull created"` Checked *time.Time `xorm:"null"` Duration time.Duration }
func GetTestById ¶
func (*Test) GetInputFileName ¶
func (*Test) GetOutputFileName ¶
type User ¶
type User struct { Id int64 `xorm:"pk notnull autoincr"` Score int64 `xorm:"notnull"` Created time.Time `xorm:"notnull created"` Updated time.Time `xorm:"notnull updated"` Email string `xorm:"notnull unique" json:"-"` EmailVerified bool `json:"-"` Name string `xorm:"notnull"` Picture string }
func GetDebugUser ¶
func GetDebugUser() *User
func GetUserByEmail ¶
func GetUserById ¶
Click to show internal directories.
Click to hide internal directories.