mock

package
v0.0.0-...-fd0897c Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeCA

type FakeCA struct {
	SignedCert    []byte
	SignErr       error
	KeyCertBundle util.KeyCertBundle
}

FakeCA is a mock of CertificateAuthority.

func (*FakeCA) GetCAKeyCertBundle

func (ca *FakeCA) GetCAKeyCertBundle() util.KeyCertBundle

GetCAKeyCertBundle returns KeyCertBundle if KeyCertBundle is not nil, otherwise, it returns an empty FakeKeyCertBundle.

func (*FakeCA) Sign

func (ca *FakeCA) Sign([]byte, time.Duration) ([]byte, error)

Sign returns the SignErr if SignErr is not nil, otherwise, it returns SignedCert.

func (*FakeCA) SignCAServerCert

func (ca *FakeCA) SignCAServerCert([]byte, time.Duration) ([]byte, error)

SignCAServerCert returns the SignErr if SignErr is not nil, otherwise, it returns SignedCert.

Jump to

Keyboard shortcuts

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