mssql

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyExists = echo.NewHTTPError(http.StatusInternalServerError, "role has used,can`t delete")
)

Custom errors

Functions

This section is empty.

Types

type Role

type Role struct{}

Role represents the client for role table

func NewRole

func NewRole() *Role

NewRole returns a new role database instance

func (*Role) Create

func (u *Role) Create(db *gorm.DB, ce *casbin.Enforcer, resprole *schemago.RespRole) error

Create Create

func (*Role) Delete

func (u *Role) Delete(db *gorm.DB, ce *casbin.Enforcer, roleid string) error

Delete delete

func (*Role) Get

func (u *Role) Get(db *gorm.DB, roleid string) (*schemago.RespRole, error)

Get get role on database

func (*Role) Query

func (u *Role) Query(db *gorm.DB, req *schemago.ReqRole) ([]schemago.SRole, int, error)

Query query roles on database

func (*Role) Update

func (u *Role) Update(db *gorm.DB, ce *casbin.Enforcer, resprole *schemago.RespRole) error

Update update

Jump to

Keyboard shortcuts

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