cache

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Uint16Bytes added in v0.2.0

func Uint16Bytes(v uint16) []byte

func Uint32Bytes added in v0.2.0

func Uint32Bytes(v uint32) []byte

func Uint64Bytes added in v0.2.0

func Uint64Bytes(v uint64) []byte

Types

type CacheLoader added in v0.2.0

type CacheLoader[V any] interface {
	Hash(maphash.Seed) uint64
	Load() (V, error)
}

type Cacher added in v0.2.0

type Cacher[V any] interface {
	Load(CacheLoader[V]) (V, error)
}

func NewCacher added in v0.2.0

func NewCacher[V any]() Cacher[V]

type CertLoader added in v0.2.0

type CertLoader struct {
	Parent   *x509.Certificate
	Template *x509.Certificate
	Key      any
	Random   io.Reader
}

func (*CertLoader) Hash added in v0.2.0

func (l *CertLoader) Hash(seed maphash.Seed) uint64

func (*CertLoader) Load added in v0.2.0

func (l *CertLoader) Load() (cert crypto.Certificate, err error)

type ECDSALoader added in v0.2.0

type ECDSALoader struct {
	Hostname string
	Curve    crypto.ECDSACurve
	Random   io.Reader
}

func (*ECDSALoader) Hash added in v0.2.0

func (l *ECDSALoader) Hash(seed maphash.Seed) uint64

func (*ECDSALoader) Load added in v0.2.0

func (l *ECDSALoader) Load() (key *ecdsa.PrivateKey, err error)

type ED25519Loader added in v0.2.0

type ED25519Loader struct {
	Hostname string
	Random   io.Reader
}

func (*ED25519Loader) Hash added in v0.2.0

func (l *ED25519Loader) Hash(seed maphash.Seed) uint64

func (*ED25519Loader) Load added in v0.2.0

func (l *ED25519Loader) Load() (key ed25519.PrivateKey, err error)

type HOTPLoader added in v0.2.0

type HOTPLoader struct {
	Issuer      string
	AccountName string
	SecretSize  uint
	Algorithm   hash.Algorithm
	Random      io.Reader
}

func (*HOTPLoader) Hash added in v0.2.0

func (l *HOTPLoader) Hash(seed maphash.Seed) uint64

func (*HOTPLoader) Load added in v0.2.0

func (l *HOTPLoader) Load() (key *otp.Key, err error)

type RSALoader added in v0.2.0

type RSALoader struct {
	Hostname string
	Length   int
	Random   io.Reader
}

func (*RSALoader) Hash added in v0.2.0

func (l *RSALoader) Hash(seed maphash.Seed) uint64

func (*RSALoader) Load added in v0.2.0

func (l *RSALoader) Load() (key *rsa.PrivateKey, err error)

type TOTPLoader added in v0.2.0

type TOTPLoader struct {
	Issuer      string
	AccountName string
	Period      uint
	SecretSize  uint
	Algorithm   hash.Algorithm
	Random      io.Reader
}

func (*TOTPLoader) Hash added in v0.2.0

func (l *TOTPLoader) Hash(seed maphash.Seed) uint64

func (*TOTPLoader) Load added in v0.2.0

func (l *TOTPLoader) Load() (key *otp.Key, err error)

Jump to

Keyboard shortcuts

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