auth

package
v1.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, driver IAuthDriver)

Types

type Apikey

type Apikey struct {
}

func NewApikey

func NewApikey() *Apikey

func (*Apikey) Name

func (a *Apikey) Name() string

func (*Apikey) ToConfig

func (a *Apikey) ToConfig(cfg map[string]interface{}) interface{}

func (*Apikey) ToPattern

func (a *Apikey) ToPattern(cfg map[string]interface{}) interface{}

type Basic

type Basic struct {
}

func NewBasic

func NewBasic() *Basic

func (*Basic) Name

func (b *Basic) Name() string

func (*Basic) ToConfig

func (b *Basic) ToConfig(cfg map[string]interface{}) interface{}

func (*Basic) ToPattern

func (b *Basic) ToPattern(cfg map[string]interface{}) interface{}

type DriverManager

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

func NewAuthDriverManager

func NewAuthDriverManager() *DriverManager

func (*DriverManager) Get

func (a *DriverManager) Get(name string) (IAuthDriver, bool)

func (*DriverManager) Register

func (a *DriverManager) Register(name string, driver IAuthDriver)

type IAuthDriver

type IAuthDriver interface {
	Name() string
	ToPattern(cfg map[string]interface{}) interface{}
	ToConfig(cfg map[string]interface{}) interface{}
}

func Get

func Get(name string) (IAuthDriver, bool)

Jump to

Keyboard shortcuts

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