Versions in this module Expand all Collapse all v0 v0.3.0 Sep 26, 2021 v0.2.1 Sep 15, 2021 v0.2.0 Sep 15, 2021 Changes in this version + const AdminSessionID + func AdminModule(ac quick.Context) + func AdminSessionCheck(storage session.Storage, fnCanAccessAPI FnCanAccessAPI, logf quick.Logf) echo.MiddlewareFunc + func Migrate(db *gorm.DB) error + type API struct + ID uint + Method string + Name string + Path string + type APIData struct + Method string + Path string + type APIDataList []APIData + func (r *APIDataList) Scan(value interface{}) error + func (r *APIDataList) Value() (driver.Value, error) + type Action struct + ID string + Name string + type Admin struct + Account string + Active bool + Code string + CreatedAt time.Time + ID uint + Mobile string + Name string + Password string + UpdatedAt time.Time + func (o *Admin) Desensitive() + func (o *Admin) SetPassword(pass string) error + func (o Admin) CheckPassword(pass string) bool + type AdminLoginReq struct + Account string + Password string + Remember bool + type AdminRole struct + AdminID uint + ID uint + RoleID uint + type CreateAdminCmd struct + Account string + Active bool + Mobile string + Name string + Password string + RoleIDList []uint + type DataPerm struct + Domain string + Perm map[string]json.RawMessage + type DataPerms []DataPerm + func (r *DataPerms) Scan(value interface{}) error + func (r DataPerms) Value() (driver.Value, error) + type FnBuildDataPermAppliers func(ctx context.Context, adminID uint) []dataperm.Applier + type FnCanAccessAPI func(ctx context.Context, adminID uint, method, path string) bool + type Menu struct + APIList sqlex.StringList + CreatedAt time.Time + ID uint + Name string + ParentID uint + Sort int + Type string + URL string + UpdatedAt time.Time + type MenuData struct + ID uint + Name string + ParentID uint + Type string + type MenuDataList []MenuData + func (r *MenuDataList) Scan(value interface{}) error + func (r *MenuDataList) Value() (driver.Value, error) + type MenuList []Menu + func (ml MenuList) AsNode() MenuNode + func (ml MenuList) Len() int + func (ml MenuList) Less(i, j int) bool + func (ml MenuList) Swap(i, j int) + type MenuNode struct + Actions []*Action + Children []*MenuNode + ID uint + Name string + ParentID uint + Type string + URL string + type QueryAdminPageByRoleCmd struct + Account string + Active *bool + Mobile string + Name string + Page int + RoleIDList []uint + Size int + type QueryAdminPageCmd struct + Account string + Active *bool + Mobile string + Name string + Page int + Size int + type QueryRoleListCmd struct + Group string + Key string + type Role struct + CreatedAt time.Time + DataPerms DataPerms + Group string + ID uint + Key string + Name string + UpdatedAt time.Time + type RoleData struct + ID uint + Key string + Name string + type RoleDataList []RoleData + func (r *RoleDataList) Scan(value interface{}) error + func (r *RoleDataList) Value() (driver.Value, error) + type RoleMenu struct + ID uint + MenuID uint + RoleID uint + type Roles []Role + func (rs Roles) BelongGroup(group string) bool + func (rs Roles) ContainsKey(key string) bool + func (rs Roles) IsCFDGroup() bool + type Service interface + BindMiniapp func(ctx context.Context, code, openid, password string) (err error) + CanAccessAPI func(ctx context.Context, adminID uint, method, path string) bool + CreateAdmin func(context.Context, CreateAdminCmd) (Admin, error) + GetAdminByAccount func(context.Context, string) (Admin, error) + GetAdminByCode func(ctx context.Context, code string) (data Admin, err error) + GetAdminByID func(context.Context, uint) (Admin, error) + GetAdminByWxopenid func(context.Context, string) (Admin, error) + GetPermData func(ctx context.Context, adminID uint) []DataPerm + QueryAdminPage func(context.Context, QueryAdminPageCmd) ([]Admin, support.Page, error) + QueryAdminPageByRole func(ctx context.Context, cmd QueryAdminPageByRoleCmd) (data []Admin, pg support.Page, err error) + QueryMenuListByAdminID func(context.Context, uint) ([]Menu, error) + QueryRoleIDListByAdminID func(context.Context, uint) ([]uint, error) + QueryRoleList func(context.Context, QueryRoleListCmd) ([]Role, error) + QueryRoleListByAdminID func(context.Context, uint) (Roles, error) + UpdateAdmin func(context.Context, UpdateAdminCmd) error + UpdateAdminPassword func(context.Context, UpdateAdminPasswordCmd) error + func NewService(db *gorm.DB) Service + type Session struct + ID uint + Mobile string + Name string + Remember bool + type UpdateAdminCmd struct + Account string + Active bool + ID uint + Mobile string + Name string + RoleIDList []uint + type UpdateAdminPasswordCmd struct + ID uint + Origin string + Password string + type WxAdmin struct + AdminID uint + CreatedAt time.Time + ID uint + Openid string + UpdatedAt time.Time v0.1.2 Aug 26, 2021 v0.1.1 Aug 25, 2021 v0.1.0 Aug 25, 2021