authz

package
v0.0.0-...-c5fdaab Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Form

type Form struct {
	Name        string   `json:"name"`
	Permissions []string `json:"permissions"`
	// contains filtered or unexported fields
}

func (*Form) Validate

func (f *Form) Validate() error

type Permission

type Permission struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Resource

type Resource struct {
	*api.Application
	// contains filtered or unexported fields
}

func New

func New(app *api.Application, enforcer *casbin.Enforcer, service Service) *Resource

func (*Resource) RegisterRoutes

func (r *Resource) RegisterRoutes(router clevergo.IRouter)

type Service

type Service interface {
	Count() (uint64, error)
	Query(limit, offset uint64) ([]rbac.Item, error)
}

func NewService

func NewService(db *sqlex.DB) Service

Jump to

Keyboard shortcuts

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