Documentation ¶
Index ¶
- type Clock
- type DB
- func (db *DB) CreateAccount(ctx context.Context, acc *acme.Account) error
- func (db *DB) CreateAuthorization(ctx context.Context, az *acme.Authorization) error
- func (db *DB) CreateCertificate(ctx context.Context, cert *acme.Certificate) error
- func (db *DB) CreateChallenge(ctx context.Context, ch *acme.Challenge) error
- func (db *DB) CreateDpopToken(ctx context.Context, orderID string, dpop map[string]any) error
- func (db *DB) CreateExternalAccountKey(ctx context.Context, provisionerID, reference string) (*acme.ExternalAccountKey, error)
- func (db *DB) CreateNonce(ctx context.Context) (acme.Nonce, error)
- func (db *DB) CreateOidcToken(ctx context.Context, orderID string, idToken map[string]any) error
- func (db *DB) CreateOrder(ctx context.Context, o *acme.Order) error
- func (db *DB) DeleteExternalAccountKey(ctx context.Context, provisionerID, keyID string) error
- func (db *DB) DeleteNonce(_ context.Context, nonce acme.Nonce) error
- func (db *DB) GetAccount(ctx context.Context, id string) (*acme.Account, error)
- func (db *DB) GetAccountByKeyID(ctx context.Context, kid string) (*acme.Account, error)
- func (db *DB) GetAllOrdersByAccountID(ctx context.Context, accID string) ([]string, error)
- func (db *DB) GetAuthorization(ctx context.Context, id string) (*acme.Authorization, error)
- func (db *DB) GetAuthorizationsByAccountID(_ context.Context, accountID string) ([]*acme.Authorization, error)
- func (db *DB) GetCertificate(_ context.Context, id string) (*acme.Certificate, error)
- func (db *DB) GetCertificateBySerial(ctx context.Context, serial string) (*acme.Certificate, error)
- func (db *DB) GetChallenge(ctx context.Context, id, authzID string) (*acme.Challenge, error)
- func (db *DB) GetDpopToken(ctx context.Context, orderID string) (map[string]any, error)
- func (db *DB) GetExternalAccountKey(ctx context.Context, provisionerID, keyID string) (*acme.ExternalAccountKey, error)
- func (db *DB) GetExternalAccountKeyByAccountID(context.Context, string, string) (*acme.ExternalAccountKey, error)
- func (db *DB) GetExternalAccountKeyByReference(ctx context.Context, provisionerID, reference string) (*acme.ExternalAccountKey, error)
- func (db *DB) GetExternalAccountKeys(ctx context.Context, provisionerID, cursor string, limit int) ([]*acme.ExternalAccountKey, string, error)
- func (db *DB) GetOidcToken(ctx context.Context, orderID string) (map[string]any, error)
- func (db *DB) GetOrder(ctx context.Context, id string) (*acme.Order, error)
- func (db *DB) GetOrdersByAccountID(ctx context.Context, accID string) ([]string, error)
- func (db *DB) UpdateAccount(ctx context.Context, acc *acme.Account) error
- func (db *DB) UpdateAuthorization(ctx context.Context, az *acme.Authorization) error
- func (db *DB) UpdateChallenge(ctx context.Context, ch *acme.Challenge) error
- func (db *DB) UpdateExternalAccountKey(ctx context.Context, provisionerID string, eak *acme.ExternalAccountKey) error
- func (db *DB) UpdateOrder(ctx context.Context, o *acme.Order) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a struct that implements the AcmeDB interface.
func (*DB) CreateAccount ¶
CreateAccount imlements the AcmeDB.CreateAccount interface.
func (*DB) CreateAuthorization ¶
CreateAuthorization creates an entry in the database for the Authorization. Implements the acme.DB.CreateAuthorization interface.
func (*DB) CreateCertificate ¶
CreateCertificate creates and stores an ACME certificate type.
func (*DB) CreateChallenge ¶
CreateChallenge creates a new ACME challenge data structure in the database. Implements acme.DB.CreateChallenge interface.
func (*DB) CreateDpopToken ¶ added in v0.27.3
CreateDpopToken creates DPoP resources and saves them to the DB.
func (*DB) CreateExternalAccountKey ¶ added in v0.18.1
func (db *DB) CreateExternalAccountKey(ctx context.Context, provisionerID, reference string) (*acme.ExternalAccountKey, error)
CreateExternalAccountKey creates a new External Account Binding key with a name
func (*DB) CreateNonce ¶
CreateNonce creates, stores, and returns an ACME replay-nonce. Implements the acme.DB interface.
func (*DB) CreateOidcToken ¶ added in v0.27.3
CreateOidcToken creates oidc token resources and saves them to the DB.
func (*DB) CreateOrder ¶
CreateOrder creates ACME Order resources and saves them to the DB.
func (*DB) DeleteExternalAccountKey ¶ added in v0.18.1
func (*DB) DeleteNonce ¶
DeleteNonce verifies that the nonce is valid (by checking if it exists), and if so, consumes the nonce resource by deleting it from the database.
func (*DB) GetAccount ¶
GetAccount retrieves an ACME account by ID.
func (*DB) GetAccountByKeyID ¶
GetAccountByKeyID retrieves an ACME account by KeyID (thumbprint of the Account Key -- JWK).
func (*DB) GetAllOrdersByAccountID ¶ added in v0.27.3
GetAllOrdersByAccountID returns a list of any order IDs owned by the account.
func (*DB) GetAuthorization ¶
GetAuthorization retrieves and unmarshals an ACME authz type from the database. Implements acme.DB GetAuthorization interface.
func (*DB) GetAuthorizationsByAccountID ¶ added in v0.18.1
func (db *DB) GetAuthorizationsByAccountID(_ context.Context, accountID string) ([]*acme.Authorization, error)
GetAuthorizationsByAccountID retrieves and unmarshals ACME authz types from the database.
func (*DB) GetCertificate ¶
GetCertificate retrieves and unmarshals an ACME certificate type from the datastore.
func (*DB) GetCertificateBySerial ¶ added in v0.18.1
GetCertificateBySerial retrieves and unmarshals an ACME certificate type from the datastore based on a certificate serial number.
func (*DB) GetChallenge ¶
GetChallenge retrieves and unmarshals an ACME challenge type from the database. Implements the acme.DB GetChallenge interface.
func (*DB) GetDpopToken ¶ added in v0.27.3
GetDpopToken retrieves an DPoP from the database.
func (*DB) GetExternalAccountKey ¶ added in v0.18.1
func (db *DB) GetExternalAccountKey(ctx context.Context, provisionerID, keyID string) (*acme.ExternalAccountKey, error)
GetExternalAccountKey retrieves an External Account Binding key by KeyID
func (*DB) GetExternalAccountKeyByAccountID ¶ added in v0.20.0
func (*DB) GetExternalAccountKeyByReference ¶ added in v0.18.1
func (db *DB) GetExternalAccountKeyByReference(ctx context.Context, provisionerID, reference string) (*acme.ExternalAccountKey, error)
GetExternalAccountKeyByReference retrieves an External Account Binding key with unique reference
func (*DB) GetExternalAccountKeys ¶ added in v0.18.1
func (db *DB) GetExternalAccountKeys(ctx context.Context, provisionerID, cursor string, limit int) ([]*acme.ExternalAccountKey, string, error)
GetExternalAccountKeys retrieves all External Account Binding keys for a provisioner
func (*DB) GetOidcToken ¶ added in v0.27.3
GetOidcToken retrieves an oidc token from the database.
func (*DB) GetOrdersByAccountID ¶
GetOrdersByAccountID returns a list of order IDs owned by the account.
func (*DB) UpdateAccount ¶
UpdateAccount imlements the AcmeDB.UpdateAccount interface.
func (*DB) UpdateAuthorization ¶
UpdateAuthorization saves an updated ACME Authorization to the database.
func (*DB) UpdateChallenge ¶
UpdateChallenge updates an ACME challenge type in the database.