Documentation ¶
Index ¶
- Constants
- type AppError
- type Token
- type TokenRepo
- type User
- type UserList
- type UserRepo
- func (repo *UserRepo) Create(u *User) (*User, error)
- func (repo *UserRepo) GetUserByEmail(email string) (*User, error)
- func (repo *UserRepo) GetUserByEmailAndPassword(email, password string) (*User, error)
- func (repo *UserRepo) GetUserByID(id uint64) (*User, error)
- func (repo *UserRepo) GetUserList(n, s int32) (*UserList, error)
- func (repo *UserRepo) Migrate()
Constants ¶
View Source
const ( // UserNotFound indicates user not found in database UserNotFound modelError = iota + 1 // InvalidUserOrPassword ... InvalidUserOrPassword // UserNotCreated ... UserNotCreated // SignJWTFailed ... SignJWTFailed )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { gorm.Model `json:"gormModel"` Email string `gorm:"unique_index;not null" json:"email"` Password string `gorm:"not null" json:"password"` Name string `json:"name"` }
User user model
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
UserRepo ...
func (*UserRepo) GetUserByEmail ¶
GetUserByEmail ...
func (*UserRepo) GetUserByEmailAndPassword ¶
GetUserByEmailAndPassword ...
func (*UserRepo) GetUserByID ¶
GetUserByID ...
Click to show internal directories.
Click to hide internal directories.