boulder/sa
Jacob Hoffman-Andrews 824417f6c0
sa: refactor db initialization (#6930)
Previously, we had three chained calls initializing a database:

 - InitWrappedDb calls NewDbMap
 - NewDbMap calls NewDbMapFromConfig

Since all three are exporetd, this left me wondering when to call one vs
the others.

It turns out that NewDbMap is only called from tests, so I renamed it to
DBMapForTest to make that clear.

NewDbMapFromConfig is only called internally to the SA, so I made it
unexported it as newDbMapFromMysqlConfig.

Also, I copied the ParseDSN call into InitWrappedDb, so it doesn't need
to call DBMapForTest. Now InitWrappedDb and DBMapForTest both
independently call newDbMapFromMysqlConfig.

I also noticed that InitDBMetrics was only called internally so I
unexported it.
2023-06-13 10:15:40 -07:00
..
db Clean up database schema (#6832) 2023-04-21 10:37:05 -07:00
db-next Give orderToAuthz2 an auto-increment ID column (#6835) 2023-04-24 14:59:18 -07:00
db-users admin: add clear-email subcommand (#6919) 2023-06-01 14:33:24 -04:00
proto Store linting certificate instead of precertificate (#6807) 2023-04-26 13:54:24 -07:00
satest Remove sa-wrappers.go (#5663) 2021-09-27 13:25:41 -07:00
testdata Support writing OCSP to Redis on revocation (#6012) 2022-04-01 13:59:56 -06:00
database.go sa: refactor db initialization (#6930) 2023-06-13 10:15:40 -07:00
database_test.go sa: refactor db initialization (#6930) 2023-06-13 10:15:40 -07:00
ip_range_test.go Remove all stray copyright headers and appends the initial line to LICENSE.txt (#1853) 2016-05-31 12:32:04 -07:00
metrics.go sa: refactor db initialization (#6930) 2023-06-13 10:15:40 -07:00
migrations.sh test: Support multiple database schemas (#6344) 2022-09-07 14:59:08 -07:00
model.go admin: add clear-email subcommand (#6919) 2023-06-01 14:33:24 -04:00
model_test.go SA: Don't store HTTP-01 hostname and port in database validationrecord (#6863) 2023-05-23 15:36:17 -04:00
rate_limits.go Create new StorageAuthorityReadOnly gRPC service (#6483) 2022-11-09 11:09:12 -08:00
rate_limits_test.go RA: Return retry-after when Certificates per Registered Domain is exceeded (#6470) 2022-11-01 11:33:19 -07:00
sa.go grpc/sa: Implement deep health checks (#6928) 2023-06-12 13:58:53 -04:00
sa_test.go sa: refactor db initialization (#6930) 2023-06-13 10:15:40 -07:00
saro.go grpc/sa: Implement deep health checks (#6928) 2023-06-12 13:58:53 -04:00
sysvars.go SA: Check MariaDB system variables at startup (#6791) 2023-04-18 11:02:33 -04:00
sysvars_test.go SA: Check MariaDB system variables at startup (#6791) 2023-04-18 11:02:33 -04:00
test-cert.der Store a DB of issued names. 2015-09-28 19:37:50 -07:00
test-cert2.der Implement rate limiting by domain name. 2015-10-04 21:04:26 -07:00
type-converter.go Remove redundant jose import alias (#6887) 2023-05-15 09:45:58 -07:00
type-converter_test.go Remove redundant jose import alias (#6887) 2023-05-15 09:45:58 -07:00
www.eff.org.der Add initial certificate status in SA. 2015-04-23 19:52:34 -07:00