s_role

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Role

type Role struct {
	ID   int
	Name string
	Menu []int

	CreatedBy  string
	ModifiedBy string

	PageNum  int
	PageSize int

	Enforcer *casbin.Enforcer `inject:""`
}

func (*Role) Add

func (a *Role) Add() (id int, err int)

func (*Role) Count

func (a *Role) Count() (int, error)

func (*Role) Delete

func (a *Role) Delete() error

func (*Role) Edit

func (a *Role) Edit() (id, error int)

func (*Role) ExistByID

func (a *Role) ExistByID() (bool, error)

func (*Role) Get

func (a *Role) Get() (*model.Role, error)

func (*Role) GetAll

func (a *Role) GetAll() ([]*model.Role, error)

func (*Role) LoadAllPolicy

func (a *Role) LoadAllPolicy() error

LoadAllPolicy 加载所有的角色策略

func (*Role) LoadPolicy

func (a *Role) LoadPolicy(id int) error

LoadPolicy 加载角色权限策略

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL