casbin

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Prefix = "internal.casbin"
)

Variables

Functions

func ProviderCasbinService

func ProviderCasbinService(srv *micro.Micro) casbinpb.CasbinService

ProviderCasbinService

Types

type AppSet

type AppSet struct {
	CasbinService casbinpb.CasbinService
}

AppSet

type Casbin

type Casbin struct {
	provider.LMT
	// contains filtered or unexported fields
}

func Build

func Build(ctx context.Context, initial config.Initial, observer invoker.Observer) (*Casbin, func(), error)

func New

func New(ctx context.Context, set provider.AwareSet, appSet AppSet, cfg *Config) *Casbin

New

func ProviderCasbin

func ProviderCasbin(ctx context.Context, set provider.AwareSet, appSet AppSet, cfg *Config) (*Casbin, func(), error)

ProviderDispatcher

func (*Casbin) ImportPolicy

func (c *Casbin) ImportPolicy(path string) error

ImportPolicy

type Config

type Config struct {
	Debug   bool `fallback:"shared.debug"`
	WorkDir string
	// contains filtered or unexported fields
}

Config

func ProviderCfg

func ProviderCfg(cfg config.Configurator) (*Config, func(), error)

ProviderCfg

func (*Config) OnReload

func (c *Config) OnReload(callback func(ctx context.Context))

OnReload

func (*Config) Reload

func (c *Config) Reload(ctx context.Context)

Reload

Jump to

Keyboard shortcuts

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