boulder/cmd
Daniel McCarney 1c9ece3f44
SA: use wrapped database maps/transactions. (#4585)
New types and related infrastructure are added to the `db` package to allow
wrapping gorp DbMaps and Transactions.

The wrapped versions return a special `db.ErrDatabaseOp` error type when errors
occur. The new error type includes additional information such as the operation
that failed and the related table.

Where possible we determine the table based on the types of the gorp function
arguments. Where that isn't possible (e.g. with raw SQL queries) we try to use
a simple regexp approach to find the table name. This isn't great for general
SQL but works well enough for Boulder's existing SQL queries.

To get additional confidence my regexps work for all of Boulder's queries
I temporarily changed the `db` package's `tableFromQuery` function to panic if
the table couldn't be determined. I re-ran the full unit and integration test
suites with this configuration and saw no panics.

Resolves https://github.com/letsencrypt/boulder/issues/4559
2019-12-04 13:03:09 -05:00
..
admin-revoker SA: use wrapped database maps/transactions. (#4585) 2019-12-04 13:03:09 -05:00
akamai-purger Add a standalone akamai purger service (#4040) 2019-02-05 09:00:31 -08:00
boulder-ca Support admin. blocking public keys. (#4419) 2019-09-06 16:54:26 -04:00
boulder-janitor SA: use wrapped database maps/transactions. (#4585) 2019-12-04 13:03:09 -05:00
boulder-publisher publisher: allow custom UA for CT submissions. (#4492) 2019-10-21 15:08:03 -04:00
boulder-ra Switch GenerateOCSP to directly use protos instead of wrapper (#4549) 2019-11-14 11:10:33 -08:00
boulder-sa SA: refactor DB stat collection & collect more stats. (#4096) 2019-03-06 17:08:53 -08:00
boulder-va bdns: move logDNSError to exchangeOne, log ErrId specially. (#4553) 2019-11-15 16:03:45 -05:00
boulder-wfe Clarify public key blocklist documentation. (#4523) 2019-11-04 09:10:36 -05:00
boulder-wfe2 Clarify public key blocklist documentation. (#4523) 2019-11-04 09:10:36 -05:00
cert-checker deps: update github.com/zmap/zlint to latest. (#4399) 2019-08-13 13:05:29 -04:00
expiration-mailer SA: use wrapped database maps/transactions. (#4585) 2019-12-04 13:03:09 -05:00
expired-authz-purger2 SA: use wrapped database maps/transactions. (#4585) 2019-12-04 13:03:09 -05:00
gen-ca Dev/CI: Add Go 1.11.1 builds (#3888) 2018-10-19 09:38:20 -07:00
gen-key Add PKCS#11 certificate generation tool (#3729) 2018-06-12 12:13:09 -07:00
id-exporter SA: use wrapped database maps/transactions. (#4585) 2019-12-04 13:03:09 -05:00
log-validator log-validator: add cmd/daemon for verifying log integrity (#4482) 2019-10-21 10:12:55 -04:00
nonce-service Switch to more efficient multi nonce-service design (#4308) 2019-06-28 12:58:46 -04:00
notify-mailer SA: use wrapped database maps/transactions. (#4585) 2019-12-04 13:03:09 -05:00
ocsp-responder SA: use wrapped database maps/transactions. (#4585) 2019-12-04 13:03:09 -05:00
ocsp-updater SA: use wrapped database maps/transactions. (#4585) 2019-12-04 13:03:09 -05:00
orphan-finder Fix orphan-finder (#4507) 2019-10-25 09:51:14 -07:00
single-ocsp Improve single-ocsp command (#2181) 2016-09-15 15:28:54 -07:00
testdata Switch to DSNs (#4044) 2019-02-11 10:46:07 -08:00
weak-key-flatten Basic RSA known weak key checking (#2765) 2017-05-25 09:33:58 -07:00
weak-key-search Provide formatting logger functions. (#3699) 2018-05-10 11:06:29 -07:00
clock_generic.go Switch to new vendor style (#1747) 2016-04-18 12:51:36 -07:00
clock_integration.go Provide formatting logger functions. (#3699) 2018-05-10 11:06:29 -07:00
config.go Excise grpc maxConcurrentStreams configuration (#4257) 2019-06-12 09:35:24 -04:00
config_test.go cmd: Split out config structs (#4200) 2019-05-06 11:11:08 -04:00
shell.go cmd: remove stale package comment. (#4488) 2019-10-17 13:40:32 -04:00
shell_test.go Remove references to test-ca.pem. (#3322) 2018-01-05 12:07:12 -08:00