sa

package
v0.0.0-...-4f04cd8 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2015 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDbMap

func NewDbMap(driver string, dbConnect string) (*gorp.DbMap, error)

NewDbMap creates the root gorp mapping object. Create one of these for each database schema you wish to map. Each DbMap contains a list of mapped tables. It automatically maps the tables for the primary parts of Boulder around the Storage Authority. This may require some further work when we use a disjoint schema, like that for `certificate-authority-data.go`.

func SetSQLDebug

func SetSQLDebug(dbMap *gorp.DbMap, state bool)

SetSQLDebug enables/disables GORP SQL-level Debugging

Types

type BoulderTypeConverter

type BoulderTypeConverter struct{}

BoulderTypeConverter is used by Gorp for storing objects in DB.

func (BoulderTypeConverter) FromDb

func (tc BoulderTypeConverter) FromDb(target interface{}) (gorp.CustomScanner, bool)

FromDb converts a DB representation back into a Boulder object.

func (BoulderTypeConverter) ToDb

func (tc BoulderTypeConverter) ToDb(val interface{}) (interface{}, error)

ToDb converts a Boulder object to one suitable for the DB representation.

type SQLLogger

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

SQLLogger adapts the AuditLogger to a format GORP can use.

func (*SQLLogger) Printf

func (log *SQLLogger) Printf(format string, v ...interface{})

Printf adapts the AuditLogger to GORP's interface

type SQLStorageAuthority

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

SQLStorageAuthority defines a Storage Authority

func NewSQLStorageAuthority

func NewSQLStorageAuthority(driver string, dbConnect string) (*SQLStorageAuthority, error)

NewSQLStorageAuthority provides persistence using a SQL backend for Boulder.

func (*SQLStorageAuthority) AddCertificate

func (ssa *SQLStorageAuthority) AddCertificate(certDER []byte, regID int64) (digest string, err error)

AddCertificate stores an issued certificate.

func (*SQLStorageAuthority) AlreadyDeniedCSR

func (ssa *SQLStorageAuthority) AlreadyDeniedCSR(names []string) (already bool, err error)

AlreadyDeniedCSR queries to find if the name list has already been denied.

func (*SQLStorageAuthority) CreateTablesIfNotExists

func (ssa *SQLStorageAuthority) CreateTablesIfNotExists() (err error)

CreateTablesIfNotExists instructs the ORM to create any missing tables.

func (*SQLStorageAuthority) FinalizeAuthorization

func (ssa *SQLStorageAuthority) FinalizeAuthorization(authz core.Authorization) (err error)

FinalizeAuthorization converts a Pending Authorization to a final one

func (*SQLStorageAuthority) GetAuthorization

func (ssa *SQLStorageAuthority) GetAuthorization(id string) (authz core.Authorization, err error)

GetAuthorization obtains an Authorization by ID

func (*SQLStorageAuthority) GetCertificate

func (ssa *SQLStorageAuthority) GetCertificate(serial string) (core.Certificate, error)

GetCertificate takes a serial number and returns the corresponding certificate, or error if it does not exist.

func (*SQLStorageAuthority) GetCertificateByShortSerial

func (ssa *SQLStorageAuthority) GetCertificateByShortSerial(shortSerial string) (cert core.Certificate, err error)

GetCertificateByShortSerial takes an id consisting of the first, sequential half of a serial number and returns the first certificate whose full serial number is lexically greater than that id. This allows clients to query on the known sequential half of our serial numbers to enumerate all certificates.

func (*SQLStorageAuthority) GetCertificateStatus

func (ssa *SQLStorageAuthority) GetCertificateStatus(serial string) (status core.CertificateStatus, err error)

GetCertificateStatus takes a hexadecimal string representing the full 128-bit serial number of a certificate and returns data about that certificate's current validity.

func (*SQLStorageAuthority) GetLatestValidAuthorization

func (ssa *SQLStorageAuthority) GetLatestValidAuthorization(registrationId int64, identifier core.AcmeIdentifier) (authz core.Authorization, err error)

Get the valid authorization with biggest expire date for a given domain and registrationId

func (*SQLStorageAuthority) GetRegistration

func (ssa *SQLStorageAuthority) GetRegistration(id int64) (reg core.Registration, err error)

GetRegistration obtains a Registration by ID

func (*SQLStorageAuthority) GetRegistrationByKey

func (ssa *SQLStorageAuthority) GetRegistrationByKey(key jose.JsonWebKey) (reg core.Registration, err error)

GetRegistrationByKey obtains a Registration by JWK

func (*SQLStorageAuthority) MarkCertificateRevoked

func (ssa *SQLStorageAuthority) MarkCertificateRevoked(serial string, ocspResponse []byte, reasonCode int) (err error)

MarkCertificateRevoked stores the fact that a certificate is revoked, along with a timestamp and a reason.

func (*SQLStorageAuthority) NewPendingAuthorization

func (ssa *SQLStorageAuthority) NewPendingAuthorization(authz core.Authorization) (output core.Authorization, err error)

NewPendingAuthorization stores a new Pending Authorization

func (*SQLStorageAuthority) NewRegistration

func (ssa *SQLStorageAuthority) NewRegistration(reg core.Registration) (core.Registration, error)

NewRegistration stores a new Registration

func (*SQLStorageAuthority) SetSQLDebug

func (ssa *SQLStorageAuthority) SetSQLDebug(state bool)

SetSQLDebug enables/disables GORP SQL-level Debugging

func (*SQLStorageAuthority) UpdateOCSP

func (ssa *SQLStorageAuthority) UpdateOCSP(serial string, ocspResponse []byte) (err error)

UpdateOCSP stores an updated OCSP response.

func (*SQLStorageAuthority) UpdatePendingAuthorization

func (ssa *SQLStorageAuthority) UpdatePendingAuthorization(authz core.Authorization) (err error)

UpdatePendingAuthorization updates a Pending Authorization

func (*SQLStorageAuthority) UpdateRegistration

func (ssa *SQLStorageAuthority) UpdateRegistration(reg core.Registration) (err error)

UpdateRegistration stores an updated Registration

Jump to

Keyboard shortcuts

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