Documentation
¶
Index ¶
- Variables
- type User
- func (u *User) Create(db *gorm.DB, ce *casbin.Enforcer, req *schemago.ReqCreateUser) (*schemago.SUser, error)
- func (u *User) Delete(db *gorm.DB, ce *casbin.Enforcer, userid string) error
- func (u *User) Disable(db *gorm.DB, ce *casbin.Enforcer, userid string, active bool) error
- func (u *User) Enable(db *gorm.DB, ce *casbin.Enforcer, userid string, active bool) error
- func (u *User) Get(db *gorm.DB, userid string) (*schemago.RespUser, error)
- func (u *User) Query(db *gorm.DB, req *schemago.ReqUser) ([]schemago.RespUser, int, error)
- func (u *User) Update(db *gorm.DB, ce *casbin.Enforcer, req *schemago.ReqUpdateUser) (*schemago.SUser, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAlreadyExists = echo.NewHTTPError(http.StatusInternalServerError, "user code already exists.")
)
Custom errors
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct{}
User represents the client for user table
func (*User) Create ¶
func (u *User) Create(db *gorm.DB, ce *casbin.Enforcer, req *schemago.ReqCreateUser) (*schemago.SUser, error)
Create creates a new user on database
Click to show internal directories.
Click to hide internal directories.