Documentation ¶
Index ¶
- Variables
- func NewBranca(cfg *Config) (*branca.Branca, error)
- func NewCasbinAdapter(cfg *Config) persist.Adapter
- func NewCasbinEnforcer(m model.Model, a persist.Adapter) (*casbin.Enforcer, error)
- func NewCasbinModel(cfg *Config) (model.Model, error)
- func NewEd25519PrivateKey(cfg *Config) (ed25519.PrivateKey, error)
- func NewEd25519PublicKey(cfg *Config) (ed25519.PublicKey, error)
- func NewRSAPrivateKey(cfg *Config) (*rsa.PrivateKey, error)
- func NewRSAPublicKey(cfg *Config) (*rsa.PublicKey, error)
- type Admin
- type Casbin
- type Config
- type Key
- type KeyPair
- type Secret
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(NewRSAPrivateKey), fx.Provide(NewRSAPublicKey), fx.Provide(NewEd25519PrivateKey), fx.Provide(NewEd25519PublicKey), fx.Provide(NewBranca), fx.Provide(NewCasbinModel), fx.Provide(NewCasbinAdapter), fx.Provide(NewCasbinEnforcer), )
Module for fx.
Functions ¶
func NewCasbinAdapter ¶ added in v1.12.0
NewCasbinAdapter for config.
func NewCasbinEnforcer ¶ added in v1.12.0
NewCasbinEnforcer for config.
func NewCasbinModel ¶ added in v1.12.0
NewCasbinModel for config.
func NewEd25519PrivateKey ¶ added in v1.10.3
func NewEd25519PrivateKey(cfg *Config) (ed25519.PrivateKey, error)
NewEd25519PrivateKey from key.
func NewEd25519PublicKey ¶ added in v1.12.0
NewEd25519PublicKey from key.
func NewRSAPrivateKey ¶ added in v1.10.3
func NewRSAPrivateKey(cfg *Config) (*rsa.PrivateKey, error)
NewRSAPrivateKey from key.
Types ¶
type Config ¶
type Config struct { Issuer string `yaml:"issuer"` Casbin Casbin `yaml:"casbin"` Key Key `yaml:"key"` Secret Secret `yaml:"secret"` Admins []Admin `yaml:"admins"` Services []Service `yaml:"services"` }
Config for v1.
Click to show internal directories.
Click to hide internal directories.