credential

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadInto added in v0.16.0

func LoadInto(persistentStore PersistentStore, store *StaticCredentialStore) error

Types

type BoltStore added in v0.16.0

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

func NewBoltStore added in v0.16.0

func NewBoltStore(path string) *BoltStore

func (*BoltStore) Load added in v0.16.0

func (b *BoltStore) Load() (map[string]string, error)

func (*BoltStore) Path added in v0.16.0

func (b *BoltStore) Path() string

func (*BoltStore) Save added in v0.16.0

func (b *BoltStore) Save(snapshot map[string]string) error

type CombinedStore added in v0.16.0

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

func NewCombinedStore added in v0.16.0

func NewCombinedStore(stores ...Store) *CombinedStore

func (*CombinedStore) Add added in v0.16.0

func (s *CombinedStore) Add(user, password string)

func (*CombinedStore) Valid added in v0.16.0

func (s *CombinedStore) Valid(user, password string) bool

type PersistentStore added in v0.16.0

type PersistentStore interface {
	Load() (map[string]string, error)
	Save(snapshot map[string]string) error
}

PersistentStore provides durable storage for proxy user credential snapshots.

type StaticCredentialStore

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

func NewStaticCredentialStore added in v0.15.1

func NewStaticCredentialStore() *StaticCredentialStore

func (*StaticCredentialStore) Add added in v0.15.1

func (s *StaticCredentialStore) Add(user, password string)

func (*StaticCredentialStore) Count added in v0.16.0

func (s *StaticCredentialStore) Count() int

func (*StaticCredentialStore) Delete added in v0.16.0

func (s *StaticCredentialStore) Delete(user string) bool

func (*StaticCredentialStore) Exists added in v0.16.0

func (s *StaticCredentialStore) Exists(user string) bool

func (*StaticCredentialStore) GetHashed added in v0.16.0

func (s *StaticCredentialStore) GetHashed(user string) (string, bool)

func (*StaticCredentialStore) ListUsers added in v0.16.0

func (s *StaticCredentialStore) ListUsers() []string

func (*StaticCredentialStore) Replace added in v0.16.0

func (s *StaticCredentialStore) Replace(snapshot map[string]string)

func (*StaticCredentialStore) SetHashed added in v0.16.0

func (s *StaticCredentialStore) SetHashed(user, passwordHash string)

func (*StaticCredentialStore) Snapshot added in v0.16.0

func (s *StaticCredentialStore) Snapshot() map[string]string

func (*StaticCredentialStore) Valid

func (s *StaticCredentialStore) Valid(user, password string) bool

type Store

type Store interface {
	Add(user, password string)
	Valid(user, password string) bool
}

Jump to

Keyboard shortcuts

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