storj/satellite
paul cannon b5ddfc6fa5 satellite/satellitedb: unexport satellitedb.DB
Backstory: I needed a better way to pass around information about the
underlying driver and implementation to all the various db-using things
in satellitedb (at least until some new "cockroach driver" support makes
it to DBX). After hitting a few dead ends, I decided I wanted to have a
type that could act like a *dbx.DB but which would also carry
information about the implementation, etc. Then I could pass around that
type to all the things in satellitedb that previously wanted *dbx.DB.

But then I realized that *satellitedb.DB was, essentially, exactly that
already.

One thing that might have kept *satellitedb.DB from being directly
usable was that embedding a *dbx.DB inside it would make a lot of dbx
methods publicly available on a *satellitedb.DB instance that previously
were nicely encapsulated and hidden. But after a quick look, I realized
that _nothing_ outside of satellite/satellitedb even needs to use
satellitedb.DB at all. It didn't even need to be exported, except for
some trivially-replaceable code in migrate_postgres_test.go. And once
I made it unexported, any concerns about exposing new methods on it were
entirely moot.

So I have here changed the exported *satellitedb.DB type into the
unexported *satellitedb.satelliteDB type, and I have changed all the
places here that wanted raw dbx.DB handles to use this new type instead.
Now they can just take a gander at the implementation member on it and
know all they need to know about the underlying database.

This will make it possible for some other pending code here to
differentiate between postgres and cockroach backends.

Change-Id: I27af99f8ae23b50782333da5277b553b34634edc
2019-12-16 19:09:30 +00:00
..
accounting satellite/console: project usage limits api (#3702) 2019-12-12 14:58:15 +02:00
attribution storagenode/notifications: db created (#3707) 2019-12-16 19:59:01 +02:00
audit do not update pointer for failed audits 2019-12-16 10:50:54 -05:00
console satellitedb: fix migration cockroach test 2019-12-16 18:02:31 +00:00
contact satellite/nodeselection: don't select nodes that haven't checked in for a while (#3567) 2019-11-15 23:43:06 +01:00
dbcleanup private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
gc private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
gracefulexit satellite/gracefulexit: enable graceful exit in production 2019-12-09 17:32:34 +00:00
inspector private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
mailservice satellite/mailservice: move logging to send rendered async to cover template parsing (#3654) 2019-11-28 12:29:48 +02:00
marketingweb satellitedb: fix migration cockroach test 2019-12-16 18:02:31 +00:00
metainfo storagenode/notifications: db created (#3707) 2019-12-16 19:59:01 +02:00
metrics private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
nodestats all: use pkg/rpc instead of pkg/transport 2019-09-25 15:37:06 -06:00
orders satellite/metainfo, satellite/repair, uplink/eestream: add metric for download failed due to not enough pieces available (#3665) 2019-12-04 16:24:36 -05:00
overlay satellite/nodeselection: don't select nodes that haven't checked in for a while (#3567) 2019-11-15 23:43:06 +01:00
payments satellite/payments/tokens: return checkout url on new deposit (#3696) 2019-12-12 15:09:19 +02:00
referrals storagenode/notifications: db created (#3707) 2019-12-16 19:59:01 +02:00
repair satellite/metainfo: don't leak error implementation detail (#3722) 2019-12-10 15:21:30 -05:00
rewards satellitedb: fix migration cockroach test 2019-12-16 18:02:31 +00:00
satellitedb satellite/satellitedb: unexport satellitedb.DB 2019-12-16 19:09:30 +00:00
vouchers private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
api.go satellite/console: project usage limits api (#3702) 2019-12-12 14:58:15 +02:00
core.go satellite/payments: coupons and coupon usage (#3648) 2019-11-26 19:58:51 +02:00
peer.go private,satellite: unite all the "temp db schema" things 2019-12-05 15:36:59 +00:00
repairer.go private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00