Documentation ¶
Index ¶
- type Admin
- type Challenge
- type Flag
- type MDB
- func (mdb *MDB) CreateAdmin(admin *Admin) (int64, error)
- func (mdb *MDB) CreateTeam(team *Team) (int64, error)
- func (mdb *MDB) CreateUser(user *User) (int64, error)
- func (mdb *MDB) DeleteAdmin(admin *Admin) (int64, error)
- func (mdb *MDB) DeleteUser(user *User) (int64, error)
- func (mdb *MDB) GetAdminWithId(id int64) (*Admin, error)
- func (mdb *MDB) GetAdminWithUsername(username string) (*Admin, error)
- func (mdb *MDB) GetTeamCount() (int, error)
- func (mdb *MDB) GetTeamWithId(id uint) (*Team, error)
- func (mdb *MDB) GetTeams(offset, limit int) ([]*Team, error)
- func (mdb *MDB) GetUserCount() (int, error)
- func (mdb *MDB) GetUserWithEmail(email string) (*User, error)
- func (mdb *MDB) GetUserWithId(id uint) (*User, error)
- func (mdb *MDB) GetUserWithPhone(phone string) (*User, error)
- func (mdb *MDB) GetUserWithUsername(username string) (*User, error)
- func (mdb *MDB) GetUsers(offset, limit int) ([]*User, error)
- func (mdb *MDB) UpdateAdmin(admin *Admin) (int64, error)
- func (mdb *MDB) UpdateUser(user *User) (int64, error)
- type Team
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Challenge ¶
type Challenge struct { gorm.Model Name string `json:"name"` Description string `json:"description" gorm:"type:text"` Category string `json:"category"` Image string `json:"image"` ConnInfo string `json:"conn_info"` InitScore uint `json:"init_score"` MiniScore uint `json:"mini_score"` Visible bool `json:"visible"` }
type MDB ¶
type MDB struct { Type string // contains filtered or unexported fields }
func (*MDB) GetAdminWithUsername ¶
func (*MDB) GetTeamCount ¶
func (*MDB) GetUserCount ¶
func (*MDB) GetUserWithUsername ¶
type User ¶
type User struct { gorm.Model Name string `json:"name"` Gender uint `json:"gender"` Phone string `json:"phone"` Email string `json:"email"` Avatar string `json:"avatar"` Introduction string `json:"introduction"` Username string `json:"username"` Password string `json:"password"` Active bool `json:"active"` Score uint `json:"score"` TeamId uint `json:"team_id"` }
Click to show internal directories.
Click to hide internal directories.