authz

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CasbinOption

type CasbinOption struct {
	ModelFile  string        `json:"model" mapstructure:"model"`
	Driver     string        `json:"driver,omitempty" mapstructure:"driver,omitempty"`
	MySQL      *MySQLOptions `json:"mysql,omitempty" mapstructure:"mysql,omitempty"`
	PolicyFile string        `json:"policy,omitempty" mapstructure:"policy,omitempty"`
}

func NewCabinOption

func NewCabinOption() *CasbinOption

func (*CasbinOption) AddFlags

func (o *CasbinOption) AddFlags(fs *pflag.FlagSet)

func (*CasbinOption) Enabled

func (o *CasbinOption) Enabled() bool

func (*CasbinOption) Validate

func (o *CasbinOption) Validate() error

type MySQLOptions

type MySQLOptions struct {
	Username string `json:"username" mapstructure:"username,omitempty"`
	Password string `json:"password" mapstructure:"password,omitempty"`
	Host     string `json:"host" mapstructure:"host,omitempty"`
	Port     string `json:"port" mapstructure:"port,omitempty"`
}

func NewMySQLOptions

func NewMySQLOptions() *MySQLOptions

NewMySQLOptions new a mysql option.

func (*MySQLOptions) AddFlags

func (o *MySQLOptions) AddFlags(fs *pflag.FlagSet)

func (*MySQLOptions) Validate

func (o *MySQLOptions) Validate() error

Validate validate log options is valid.

type Options

type Options struct {
	Casbin *CasbinOption `json:"casbin" mapstructure:"casbin,omitempty"`
}

func NewOptions

func NewOptions() *Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

func (*Options) Validate

func (o *Options) Validate() error

Jump to

Keyboard shortcuts

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