certcache

package
v0.0.0-...-2ca223a Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertCache

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

CertCache is a certificate cache, backed by a database table.

func New

func New(b *pisces.Tables, name string) *CertCache

New creates a new certificate cache. When name is empty, "cert_cache" is used.

func (*CertCache) Delete

func (b *CertCache) Delete(_ context.Context, name string) error

Delete remotes an entry. If the entry does not exist, it is a noop.

func (*CertCache) Get

func (b *CertCache) Get(_ context.Context, name string) ([]byte, error)

Get gets a certificate entry by name. Returns autocert.ErrCacheMiss if the entry is not found.

func (*CertCache) Put

func (b *CertCache) Put(_ context.Context, name string, data []byte) error

Put saves a certificate entry by name. If the entry already exists, it will be replaces.

Jump to

Keyboard shortcuts

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