Skip to content

pkg/db: move a few DB-related packages to here + add pkg/db/globalstatedb

Warren Gifford requested to merge sg/pkg-db into master

Created by: slimsag

Part one: code location refactor

Prior to this change we had:

  • pkg/conf/confdb
  • pkg/dbconn
  • cmd/frontend/db/testing

This was confusing because e.g. it was hard to find all DB related logic AND because pkg/conf/confdb would import cmd/frontend/db/testing.

After this change we have:

  • pkg/db/confdb
  • pkg/db/dbconn
  • pkg/db/dbtesting

Part two: exposing global_state DB table (pkg/db/globalstatedb)

The management console needs somewhere in the database to store the basic auth password (spec), and the global_state DB table seems like the right place to do it. This means that the management console service must access that table; therefor moving it into its own package which the management console can import makes sense.

Merge request reports

Loading