mongocertstore

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 6 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 {
	Collection *mgo.Collection
	DB         database.DocumentDatabase
}

CertCache implements the autocert Cache interface and provides the ability to store SSL certs in the MongoDB. TODO: Add ability to mock Collection

func NewCertCache

func NewCertCache(db database.DocumentDatabase, collectionName string) *CertCache

func (*CertCache) Delete

func (cc *CertCache) Delete(ctx context.Context, key string) error

func (*CertCache) Get

func (cc *CertCache) Get(ctx context.Context, key string) ([]byte, error)

func (*CertCache) Put

func (cc *CertCache) Put(ctx context.Context, key string, data []byte) error

type CertCacheItem

type CertCacheItem struct {
	Certificate        []byte    `json:"certificate" bson:"certificate"`
	DateTimeCreatedUTC time.Time `json:"dateTimeCreatedUTC" bson:"dateTimeCreatedUTC"`
	Key                string    `json:"key" bson:"key"`
}

Jump to

Keyboard shortcuts

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