auth

package
v1.3.50 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Zlib Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Engine added in v0.5.11

func Engine() token.Engine

Types

type Item

type Item struct {
	Enabled bool          `json:"enabled"`
	Secret  secret.Secret `json:"secret"`
}

func (*Item) EnableFlag added in v1.0.3

func (it *Item) EnableFlag() int

EnableFlag return 0= disable, 1=enable, 2=not exist

func (*Item) GetSecret added in v1.0.3

func (it *Item) GetSecret() secret.Secret

func (*Item) SetEnabled added in v1.0.3

func (it *Item) SetEnabled(enable bool)

type ItemSecret added in v1.0.3

type ItemSecret interface {
	GetSecret() secret.Secret
	SetEnabled(enable bool)
	// EnableFlag return 0= disable, 1=enable, 2=not exist
	EnableFlag() int
}

type SecretMgr

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

func NewSecretMgr added in v0.5.11

func NewSecretMgr() *SecretMgr

func (*SecretMgr) AddItem added in v0.5.0

func (mgr *SecretMgr) AddItem(key string, item ItemSecret)

func (*SecretMgr) AddItemWithSource added in v1.0.3

func (mgr *SecretMgr) AddItemWithSource(source token.Source, item Item)

func (*SecretMgr) AddSecret added in v0.5.0

func (mgr *SecretMgr) AddSecret(source token.Source, secret secret.Secret)

func (*SecretMgr) AddSecretWithKey added in v0.5.0

func (mgr *SecretMgr) AddSecretWithKey(key string, secret secret.Secret)

func (*SecretMgr) EnableFlag added in v0.5.19

func (mgr *SecretMgr) EnableFlag(source token.Source) int

EnableFlag implement token.Secret interface

func (*SecretMgr) GetSecret

func (mgr *SecretMgr) GetSecret(source token.Source) secret.Secret

GetSecret implement token.Secret interface

func (*SecretMgr) Load added in v0.5.0

func (mgr *SecretMgr) Load(items map[string]Item) error

func (*SecretMgr) LoadFromFile added in v0.5.0

func (mgr *SecretMgr) LoadFromFile(file string) error

func (*SecretMgr) SetEnabled

func (mgr *SecretMgr) SetEnabled(source token.Source, enable bool)

SetEnabled implement token.Secret interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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