tlsloader

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: BSD-3-Clause Imports: 7 Imported by: 1

README

tlsloader

TLS Cert Loader

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(certFile, keyFile string) (cert *tls.Certificate, err error)

func ReadFrom

func ReadFrom(s Storage, cb func(r io.Reader) error) (err error)

Types

type FileStorage

type FileStorage struct {
	Path string
}

func NewFileStorage

func NewFileStorage(path string) *FileStorage

func (*FileStorage) Reader

func (this *FileStorage) Reader() (io.ReadCloser, error)

type PairStorage

type PairStorage struct {
	Cert, Key Storage
}

func NewSafeFilePairStorage

func NewSafeFilePairStorage(certPath, keyPath string, mode ...os.FileMode) *PairStorage

type Storage

type Storage interface {
	Reader() (r io.ReadCloser, err error)
}

Jump to

Keyboard shortcuts

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