Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sql.DB
DB is the database object shared by everyone
View Source
var ErrWrongCredentials = errors.New("Wrong credentials")
ErrWrongCredentials is returned when username or password does not match
Functions ¶
func GetValidatedChallengePerUser ¶
func GetValidatedChallengePerUser() (map[string][]*TerminatedJob, error)
GetValidatedChallengePerUser returns a map containing for each user its validated challenges
Types ¶
type TerminatedJob ¶
type TerminatedJob struct { UUID string Challenge string Username string Code string Status int Created time.Time }
TerminatedJob is a struct which allow to save job that ended in base
func GetLastNJobs ¶
func GetLastNJobs(count int) ([]*TerminatedJob, error)
GetLastNJobs gets a given amount of jobs from the database
func NewTerminatedJobFromJob ¶
NewTerminatedJobFromJob returns a terminated and persisted job
type User ¶
User struct containing user informations
func (*User) SetPassword ¶
SetPassword hash users password
Click to show internal directories.
Click to hide internal directories.