nosql

package
v0.17.3-rc5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 13 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock struct{}

Clock that returns time in UTC rounded to seconds.

func (*Clock) Now

func (c *Clock) Now() time.Time

Now returns the UTC time rounded to seconds.

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB is a struct that implements the AcmeDB interface.

func New

func New(db nosqlDB.DB) (*DB, error)

New configures and returns a new ACME DB backend implemented using a nosql DB.

func (*DB) CreateAccount

func (db *DB) CreateAccount(ctx context.Context, acc *acme.Account) error

CreateAccount imlements the AcmeDB.CreateAccount interface.

func (*DB) CreateAuthorization

func (db *DB) CreateAuthorization(ctx context.Context, az *acme.Authorization) error

CreateAuthorization creates an entry in the database for the Authorization. Implements the acme.DB.CreateAuthorization interface.

func (*DB) CreateCertificate

func (db *DB) CreateCertificate(ctx context.Context, cert *acme.Certificate) error

CreateCertificate creates and stores an ACME certificate type.

func (*DB) CreateChallenge

func (db *DB) CreateChallenge(ctx context.Context, ch *acme.Challenge) error

CreateChallenge creates a new ACME challenge data structure in the database. Implements acme.DB.CreateChallenge interface.

func (*DB) CreateNonce

func (db *DB) CreateNonce(ctx context.Context) (acme.Nonce, error)

CreateNonce creates, stores, and returns an ACME replay-nonce. Implements the acme.DB interface.

func (*DB) CreateOrder

func (db *DB) CreateOrder(ctx context.Context, o *acme.Order) error

CreateOrder creates ACME Order resources and saves them to the DB.

func (*DB) DeleteNonce

func (db *DB) DeleteNonce(ctx context.Context, nonce acme.Nonce) error

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

func (db *DB) GetAccount(ctx context.Context, id string) (*acme.Account, error)

GetAccount retrieves an ACME account by ID.

func (*DB) GetAccountByKeyID

func (db *DB) GetAccountByKeyID(ctx context.Context, kid string) (*acme.Account, error)

GetAccountByKeyID retrieves an ACME account by KeyID (thumbprint of the Account Key -- JWK).

func (*DB) GetAuthorization

func (db *DB) GetAuthorization(ctx context.Context, id string) (*acme.Authorization, error)

GetAuthorization retrieves and unmarshals an ACME authz type from the database. Implements acme.DB GetAuthorization interface.

func (*DB) GetCertificate

func (db *DB) GetCertificate(ctx context.Context, id string) (*acme.Certificate, error)

GetCertificate retrieves and unmarshals an ACME certificate type from the datastore.

func (*DB) GetChallenge

func (db *DB) GetChallenge(ctx context.Context, id, authzID string) (*acme.Challenge, error)

GetChallenge retrieves and unmarshals an ACME challenge type from the database. Implements the acme.DB GetChallenge interface.

func (*DB) GetOrder

func (db *DB) GetOrder(ctx context.Context, id string) (*acme.Order, error)

GetOrder retrieves an ACME Order from the database.

func (*DB) GetOrdersByAccountID

func (db *DB) GetOrdersByAccountID(ctx context.Context, accID string) ([]string, error)

GetOrdersByAccountID returns a list of order IDs owned by the account.

func (*DB) UpdateAccount

func (db *DB) UpdateAccount(ctx context.Context, acc *acme.Account) error

UpdateAccount imlements the AcmeDB.UpdateAccount interface.

func (*DB) UpdateAuthorization

func (db *DB) UpdateAuthorization(ctx context.Context, az *acme.Authorization) error

UpdateAuthorization saves an updated ACME Authorization to the database.

func (*DB) UpdateChallenge

func (db *DB) UpdateChallenge(ctx context.Context, ch *acme.Challenge) error

UpdateChallenge updates an ACME challenge type in the database.

func (*DB) UpdateOrder

func (db *DB) UpdateOrder(ctx context.Context, o *acme.Order) error

UpdateOrder saves an updated ACME Order to the database.

Jump to

Keyboard shortcuts

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