Discover Packages
github.com/silvman/mls_back
models
package
Version:
v0.0.0-...-77e484d
Opens a new window with list of versions in this module.
Published: May 6, 2019
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func InitValidator() *validator.Validate
type Login struct {
Username string `validate:"required" json:"username"`
Password string `validate:"required" json:"password"`
}
type Registration struct {
Username string `validate:"required" json:"username"`
Email string `json:"email"`
Password string `validate:"required" json:"password"`
Avatar string `json:"avatar,omitempty"`
}
type Score struct {
Score int `db:"score" json:"score"`
}
type Upgrade struct {
Id int `db:"uid" json:"id"`
Name string `db:"name" json:"name"`
Cost int `db:"cost" json:"cost"`
Type int `db:"type" json:"type"`
Modificator int `db:"modificator" json:"modificator"`
Image string `db:"image" json:"image"`
Duration int `db:"time" json:"time"`
}
type User struct {
ID int `db:"uid" json:"id"`
Username string `db:"username" json:"username" `
Email string `db:"email" json:"email"`
Password string `db:"pass" json:"-"`
Avatar string `db:"avatar" json:"avatar,omitempty" `
Score int `db:"score" json:"score"`
Level int `db:"level" json:"level"`
}
type UserUpdate struct {
Email string `json:"email,omitempty" validate:"email"`
Password string `json:"password,omitempty" valid:"-"`
Avatar string `json:"avatar,omitempty" valid:"-"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.