role

package
v0.0.0-...-9b07b7c Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: MIT Imports: 5 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 {
	// contains filtered or unexported fields
}

Role represents role application service

func Initialize

func Initialize(db *gorm.DB, ce *casbin.Enforcer, sec Securer) *Role

Initialize initalizes role application service with defaults

func New

func New(db *gorm.DB, ce *casbin.Enforcer, udb UDB, sec Securer) *Role

New creates new role application service

func (*Role) Create

func (a *Role) Create(c echo.Context, resprole *schemago.RespRole) error

Create create

func (*Role) Delete

func (a *Role) Delete(c echo.Context, roleid string) error

Delete provided by roleId

func (*Role) Get

func (a *Role) Get(c echo.Context, roleid string) (*schemago.RespRole, error)

Get provided by roleId

func (*Role) Query

func (a *Role) Query(c echo.Context, req *schemago.ReqRole) ([]schemago.SRole, int, error)

Query provided by limit page code name

func (*Role) Update

func (a *Role) Update(c echo.Context, resprole *schemago.RespRole) error

Update update

type Securer

type Securer interface {
	Hash(string) string
}

Securer represents security interface

type Service

Service represents role application interface

type UDB

UDB represents role repository interface

Directories

Path Synopsis
platform

Jump to

Keyboard shortcuts

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