db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: MPL-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExistingAccountError

type ExistingAccountError struct {
	MatchingAccount *core.Account
}

ExistingAccountError is an error type indicating when an operation fails because the MatchingAccount has a key conflict.

func (ExistingAccountError) Error

func (e ExistingAccountError) Error() string

type MemoryStore

type MemoryStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Pebble keeps all of its various objects (accounts, orders, etc) in-memory, not persisted anywhere. MemoryStore implements this in-memory "database"

func NewMemoryStore

func NewMemoryStore(clk clock.Clock) *MemoryStore

func (*MemoryStore) AddAccount

func (m *MemoryStore) AddAccount(acct *core.Account) (int, error)

func (*MemoryStore) AddAuthorization

func (m *MemoryStore) AddAuthorization(authz *core.Authorization) (int, error)

func (*MemoryStore) AddCertificate

func (m *MemoryStore) AddCertificate(cert *core.Certificate) (int, error)

func (*MemoryStore) AddChallenge

func (m *MemoryStore) AddChallenge(chal *core.Challenge) (int, error)

func (*MemoryStore) AddOrder

func (m *MemoryStore) AddOrder(order *core.Order) (int, error)

func (*MemoryStore) ChangeAccountKey

func (m *MemoryStore) ChangeAccountKey(acct *core.Account, newKey *jose.JSONWebKey) error

func (*MemoryStore) GetAccountByID

func (m *MemoryStore) GetAccountByID(id string) *core.Account

func (*MemoryStore) GetAccountByKey

func (m *MemoryStore) GetAccountByKey(key crypto.PublicKey) (*core.Account, error)

func (*MemoryStore) GetAuthorizationByID

func (m *MemoryStore) GetAuthorizationByID(id string) *core.Authorization

func (*MemoryStore) GetCertificateByDER

func (m *MemoryStore) GetCertificateByDER(der []byte) *core.Certificate

GetCertificateByDER loops over all certificates to find the one that matches the provided DER bytes. This method is linear and it's not optimized to give you a quick response.

func (*MemoryStore) GetCertificateByID

func (m *MemoryStore) GetCertificateByID(id string) *core.Certificate

func (*MemoryStore) GetChallengeByID

func (m *MemoryStore) GetChallengeByID(id string) *core.Challenge

func (*MemoryStore) GetOrderByID

func (m *MemoryStore) GetOrderByID(id string) *core.Order

func (*MemoryStore) GetRevokedCertificateByDER

func (m *MemoryStore) GetRevokedCertificateByDER(der []byte) *core.Certificate

GetCertificateByDER loops over all revoked certificates to find the one that matches the provided DER bytes. This method is linear and it's not optimized to give you a quick response.

func (*MemoryStore) RevokeCertificate

func (m *MemoryStore) RevokeCertificate(cert *core.Certificate)

func (*MemoryStore) UpdateAccountByID

func (m *MemoryStore) UpdateAccountByID(id string, acct *core.Account) error

Note that this function should *NOT* be used for key changes. It assumes the public key associated to the account does not change. Use ChangeAccountKey to change the account's public key.

Jump to

Keyboard shortcuts

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