rbac

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	*casbin.Enforcer
	// contains filtered or unexported fields
}

func Default

func Default() *Controller

func New

func New(opts ...Option) *Controller

func (*Controller) Init

func (ctrl *Controller) Init() error

func (*Controller) Provide

func (ctrl *Controller) Provide(ctx context.Context) interface{}

type DbOptions

type DbOptions struct {
	// contains filtered or unexported fields
}

type Option

type Option func(*Options)

func WithDbName

func WithDbName(dbname string) Option

func WithEnableLog

func WithEnableLog(enableLog bool) Option

func WithHost

func WithHost(host string) Option

func WithModelConf

func WithModelConf(modelConf string) Option

func WithPort

func WithPort(port int) Option

func WithPwd

func WithPwd(pwd string) Option

func WithTable

func WithTable(table string) Option

func WithUser

func WithUser(user string) Option

type Options

type Options struct {
	DbOptions
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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