Documentation ¶
Index ¶
- type ExistingAccountError
- type MemoryStore
- func (m *MemoryStore) AddAccount(acct *core.Account) (int, error)
- func (m *MemoryStore) AddAuthorization(authz *core.Authorization) (int, error)
- func (m *MemoryStore) AddBlockedDomain(name string) error
- func (m *MemoryStore) AddCertificate(cert *core.Certificate) (int, error)
- func (m *MemoryStore) AddChallenge(chal *core.Challenge) (int, error)
- func (m *MemoryStore) AddExternalAccountKeyByID(keyID, key string) error
- func (m *MemoryStore) AddOrder(order *core.Order) (int, error)
- func (m *MemoryStore) AddOrderByIssuedSerial(order *core.Order) error
- func (m *MemoryStore) ChangeAccountKey(acct *core.Account, newKey *jose.JSONWebKey) error
- func (m *MemoryStore) FindValidAuthorization(accountID string, identifier acme.Identifier) *core.Authorization
- func (m *MemoryStore) GetAccountByID(id string) *core.Account
- func (m *MemoryStore) GetAccountByKey(key crypto.PublicKey) (*core.Account, error)
- func (m *MemoryStore) GetAuthorizationByID(id string) *core.Authorization
- func (m *MemoryStore) GetCertificateByDER(der []byte) *core.Certificate
- func (m *MemoryStore) GetCertificateByID(id string) *core.Certificate
- func (m *MemoryStore) GetCertificateBySerial(serialNumber *big.Int) *core.Certificate
- func (m *MemoryStore) GetChallengeByID(id string) *core.Challenge
- func (m *MemoryStore) GetExtenalAccountKeyByID(keyID string) ([]byte, bool)
- func (m *MemoryStore) GetOrderByID(id string) *core.Order
- func (m *MemoryStore) GetOrderByIssuedSerial(serial string) (*core.Order, error)
- func (m *MemoryStore) GetOrdersByAccountID(accountID string) []*core.Order
- func (m *MemoryStore) GetRevokedCertificateByDER(der []byte) *core.RevokedCertificate
- func (m *MemoryStore) GetRevokedCertificateBySerial(serialNumber *big.Int) *core.RevokedCertificate
- func (m *MemoryStore) IsDomainBlocked(name string) bool
- func (m *MemoryStore) RevokeCertificate(cert *core.RevokedCertificate)
- func (m *MemoryStore) UpdateAccountByID(id string, acct *core.Account) error
- func (m *MemoryStore) UpdateReplacedOrder(serial string, shouldBeReplaced bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExistingAccountError ¶
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 ¶
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() *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) AddBlockedDomain ¶
func (m *MemoryStore) AddBlockedDomain(name string) error
AddBlockedDomain will add the domain name to the block list
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) AddExternalAccountKeyByID ¶
func (m *MemoryStore) AddExternalAccountKeyByID(keyID, key string) error
AddExternalAccountKeyByID will add the base64 URL encoded key to the memory store with the key ID as its index. This will store the key value in its unencoded, raw form.
func (*MemoryStore) AddOrderByIssuedSerial ¶ added in v2.6.0
func (m *MemoryStore) AddOrderByIssuedSerial(order *core.Order) error
func (*MemoryStore) ChangeAccountKey ¶
func (m *MemoryStore) ChangeAccountKey(acct *core.Account, newKey *jose.JSONWebKey) error
func (*MemoryStore) FindValidAuthorization ¶
func (m *MemoryStore) FindValidAuthorization(accountID string, identifier acme.Identifier) *core.Authorization
FindValidAuthorization fetches the first, if any, valid and unexpired authorization for the provided identifier, from the ACME account matching accountID.
func (*MemoryStore) GetAccountByID ¶
func (m *MemoryStore) GetAccountByID(id string) *core.Account
func (*MemoryStore) GetAccountByKey ¶
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) GetCertificateBySerial ¶
func (m *MemoryStore) GetCertificateBySerial(serialNumber *big.Int) *core.Certificate
GetCertificateBySerial loops over all certificates to find the one that matches the provided serial number. This method is linear and it's not optimized to give you a quick response.
func (*MemoryStore) GetChallengeByID ¶
func (m *MemoryStore) GetChallengeByID(id string) *core.Challenge
func (*MemoryStore) GetExtenalAccountKeyByID ¶
func (m *MemoryStore) GetExtenalAccountKeyByID(keyID string) ([]byte, bool)
GetExternalAccountKeyByID will return the raw, base64 URL unencoded key value by its key ID pair.
func (*MemoryStore) GetOrderByID ¶
func (m *MemoryStore) GetOrderByID(id string) *core.Order
func (*MemoryStore) GetOrderByIssuedSerial ¶ added in v2.6.0
func (m *MemoryStore) GetOrderByIssuedSerial(serial string) (*core.Order, error)
GetOrderByIssuedSerial returns the order that resulted in the given certificate serial. If no such order exists, an error will be returned.
func (*MemoryStore) GetOrdersByAccountID ¶
func (m *MemoryStore) GetOrdersByAccountID(accountID string) []*core.Order
func (*MemoryStore) GetRevokedCertificateByDER ¶
func (m *MemoryStore) GetRevokedCertificateByDER(der []byte) *core.RevokedCertificate
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) GetRevokedCertificateBySerial ¶
func (m *MemoryStore) GetRevokedCertificateBySerial(serialNumber *big.Int) *core.RevokedCertificate
GetRevokedCertificateBySerial loops over all revoked certificates to find the one that matches the provided serial number. This method is linear and it's not optimized to give you a quick response.
func (*MemoryStore) IsDomainBlocked ¶
func (m *MemoryStore) IsDomainBlocked(name string) bool
IsDomainBlocked will return true if a domain is on the block list
func (*MemoryStore) RevokeCertificate ¶
func (m *MemoryStore) RevokeCertificate(cert *core.RevokedCertificate)
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.
func (*MemoryStore) UpdateReplacedOrder ¶ added in v2.6.0
func (m *MemoryStore) UpdateReplacedOrder(serial string, shouldBeReplaced bool) error
UpdateReplacedOrder takes a serial and marks a parent order as replaced/not-replaced or returns an error.
We intentionally don't Lock the database inside this method because the inner GetOrderByIssuedSerial which is used elsewhere does an RLock which would hang.