testutils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ECDSAGenerator

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

func (*ECDSAGenerator) Generate

func (g *ECDSAGenerator) Generate() (*KeyPair, error)

type Ed25519Generator

type Ed25519Generator struct{}

func (*Ed25519Generator) Generate

func (g *Ed25519Generator) Generate() (*KeyPair, error)

type KeyPair

type KeyPair struct {
	PublicKey  []byte
	PrivateKey []byte
}

KeyPair holds the public and private key PEM block bytes.

type KeyPairGenerator

type KeyPairGenerator interface {
	Generate() (*KeyPair, error)
}

func NewECDSAGenerator

func NewECDSAGenerator(c elliptic.Curve) KeyPairGenerator

func NewEd25519Generator

func NewEd25519Generator() KeyPairGenerator

func NewRSAGenerator

func NewRSAGenerator(bits int) KeyPairGenerator

type RSAGenerator

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

func (*RSAGenerator) Generate

func (g *RSAGenerator) Generate() (*KeyPair, error)

type RetryI added in v0.3.0

type RetryI interface {
	Retry(err error, opDesc string) bool
	SetTimeout(timeout time.Duration)
	SetInterval(interval time.Duration)
	SetBackoff(backoff time.Duration)
	SetRetries(retries int)
	Timeout() time.Duration
	Interval() time.Duration
	Backoff() time.Duration
	Retries() int
}

func NewRetry added in v0.3.0

func NewRetry() RetryI

type RetryOp added in v0.3.0

type RetryOp struct {
	RetryI
	// contains filtered or unexported fields
}

func (RetryOp) Backoff added in v0.3.0

func (r RetryOp) Backoff() time.Duration

func (RetryOp) Interval added in v0.3.0

func (r RetryOp) Interval() time.Duration

func (RetryOp) Retries added in v0.3.0

func (r RetryOp) Retries() int

func (RetryOp) Retry added in v0.3.0

func (r RetryOp) Retry(err error, opDesc string) bool

func (RetryOp) SetBackoff added in v0.3.0

func (r RetryOp) SetBackoff(backoff time.Duration)

func (RetryOp) SetInterval added in v0.3.0

func (r RetryOp) SetInterval(interval time.Duration)

func (RetryOp) SetRetries added in v0.3.0

func (r RetryOp) SetRetries(retries int)

func (RetryOp) SetTimeout added in v0.3.0

func (r RetryOp) SetTimeout(timeout time.Duration)

func (RetryOp) Timeout added in v0.3.0

func (r RetryOp) Timeout() time.Duration

Jump to

Keyboard shortcuts

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