Documentation ¶
Overview ¶
Package user contains user application services
Index ¶
- type Securer
- type Service
- type UDB
- type User
- func (u *User) Create(c echo.Context, req *schemago.ReqCreateUser) (*schemago.SUser, error)
- func (u *User) Delete(c echo.Context, userid string) error
- func (u *User) Disable(c echo.Context, userid string, active bool) error
- func (u *User) Enable(c echo.Context, userid string, active bool) error
- func (u *User) Get(c echo.Context, userid string) (*schemago.RespUser, error)
- func (u *User) Query(c echo.Context, req *schemago.ReqUser) ([]schemago.RespUser, int, error)
- func (u *User) Update(c echo.Context, req *schemago.ReqUpdateUser) (*schemago.SUser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { Create(echo.Context, *schemago.ReqCreateUser) (*schemago.SUser, error) Query(echo.Context, *schemago.ReqUser) ([]schemago.RespUser, int, error) Get(echo.Context, string) (*schemago.RespUser, error) Delete(echo.Context, string) error Update(echo.Context, *schemago.ReqUpdateUser) (*schemago.SUser, error) Enable(echo.Context, string, bool) error Disable(echo.Context, string, bool) error }
Service represents user application interface
type UDB ¶
type UDB interface { Create(*gorm.DB, *casbin.Enforcer, *schemago.ReqCreateUser) (*schemago.SUser, error) Query(*gorm.DB, *schemago.ReqUser) ([]schemago.RespUser, int, error) Get(*gorm.DB, string) (*schemago.RespUser, error) Update(*gorm.DB, *casbin.Enforcer, *schemago.ReqUpdateUser) (*schemago.SUser, error) Delete(*gorm.DB, *casbin.Enforcer, string) error Enable(*gorm.DB, *casbin.Enforcer, string, bool) error Disable(*gorm.DB, *casbin.Enforcer, string, bool) error }
UDB represents user repository interface
type User ¶
type User struct {
// contains filtered or unexported fields
}
User represents user application service
func Initialize ¶
Initialize initalizes user application service with defaults
Click to show internal directories.
Click to hide internal directories.