store

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

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

Go to latest
Published: Mar 17, 2017 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StoreKey       = "store"
	StoreNodesKey  = "store-nodes"
	StorePrefixKey = "store-prefix"
)

Configuration keys

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	URI   string
	Email string
	Key   []byte
}

Account represents a user account on an ACME directory

type Certificate

type Certificate struct {
	Domain           string
	AlternativeNames []string
	Expires          time.Time
	CertificateChain []byte
	PrivateKey       []byte
	Thumbprint       string
}

Certificate represents a certificate used on a server

type Challenge

type Challenge struct {
	Key   string
	Value string
}

Challenge represents an ACME challenge

type Store

type Store interface {
	GetAccount(email string) (*Account, error)
	GetCertificate(domain string) (*Certificate, error)
	GetCertificates() ([]*Certificate, error)
	GetChallenge(key string) (*Challenge, error)

	PutAccount(account *Account) error
	PutCertificate(cert *Certificate) error
	PutChallenge(challenge *Challenge) error

	DeleteChallenge(key string) error
}

Store allows data to be retrieved from a data store

func NewLibKVStore

func NewLibKVStore(store store.Store, prefix string) (Store, error)

NewLibKVStore creates a Store using Docker's libkv package

func NewStore

func NewStore(storeName string, nodes []string, prefix string) (Store, error)

NewStore creates a new store with the given parameters

func NewStoreFromConfig

func NewStoreFromConfig(conf goconfig.Config) (Store, error)

NewStoreFromConfig creates a new store based on the provided config

Jump to

Keyboard shortcuts

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