Documentation
¶
Index ¶
- type Role
- func (a *Role) Create(c echo.Context, resprole *schemago.RespRole) error
- func (a *Role) Delete(c echo.Context, roleid string) error
- func (a *Role) Get(c echo.Context, roleid string) (*schemago.RespRole, error)
- func (a *Role) Query(c echo.Context, req *schemago.ReqRole) ([]schemago.SRole, int, error)
- func (a *Role) Update(c echo.Context, resprole *schemago.RespRole) error
- type Securer
- type Service
- type UDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
Role represents role application service
func Initialize ¶
Initialize initalizes role application service with defaults
type Service ¶
type Service interface {
Query(echo.Context, *schemago.ReqRole) ([]schemago.SRole, int, error)
Get(echo.Context, string) (*schemago.RespRole, error)
Create(echo.Context, *schemago.RespRole) error
Update(echo.Context, *schemago.RespRole) error
Delete(echo.Context, string) error
}
Service represents role application interface
type UDB ¶
type UDB interface {
Query(*gorm.DB, *schemago.ReqRole) ([]schemago.SRole, int, error)
Get(*gorm.DB, string) (*schemago.RespRole, error)
Create(*gorm.DB, *casbin.Enforcer, *schemago.RespRole) error
Update(*gorm.DB, *casbin.Enforcer, *schemago.RespRole) error
Delete(*gorm.DB, *casbin.Enforcer, string) error
}
UDB represents role repository interface
Click to show internal directories.
Click to hide internal directories.