certificates

package
v1.2.2-dev.29 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateGenerator

type CertificateGenerator interface {
	Generate() error
}

func NewCertificateGenerator

func NewCertificateGenerator(t CertificateType, certificateSeed seed.CertificateSeed, w FileWriter, logger logger.LoggingClient) (CertificateGenerator, error)

type CertificateType

type CertificateType int
const (
	RootCertificate CertificateType = 1
	TLSCertificate  CertificateType = 2
)

type FileWriter

type FileWriter interface {
	Write(fileName string, contents []byte, permissions os.FileMode) error
}

FileWriter is an interface that provides abstraction for writing certificate files to disk. This abstraction is necessary for appropriate mocking of this functionality for unit tests

func NewFileWriter

func NewFileWriter() FileWriter

NewFileWriter will instantiate an instance of FileWriter for persisting the given file to disk.

Jump to

Keyboard shortcuts

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