sourcegraph/lib/managedservicesplatform
Joe Chen ce025a069a
enterprise-portal: init database schema and handler store (#63139)
Part of CORE-99

This PR scaffolds the database schema and code structure based on
[CORE-99
comment](https://linear.app/sourcegraph/issue/CORE-99/enterprise-portal-design-sams-user-to-subscription-rpcs#comment-8105ac31)
with some modifications. See inline comments for more elaborations.
- It uses GORM's ONLY for auto migration, just to kick things off, we
may migrate to file-based migration like we are planning for SAMS.
- It then uses the `*pgxpool.Pool` as the DB interface for executing
business logic queries.

Additionally, refactored `subscriptionsservice/v1.go` to use a `Store`
that provide single interface for accessing data(base), as we have been
doing in SAMS and SSC.

## Test plan

Enterprise Portal starts locally, and database is initialized:

![CleanShot 2024-06-06 at 17 02
42@2x](https://github.com/sourcegraph/sourcegraph/assets/2946214/f6cbc2bf-bd95-4691-9f87-b2450cc31e4d)
2024-06-06 18:54:12 -04:00
..
bigquerywriter bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
cloudsql chore/msp/runtime: add args as trace attributes, clean up tracing code (#63087) 2024-06-04 17:30:32 -07:00
runtime enterprise-portal: init database schema and handler store (#63139) 2024-06-06 18:54:12 -04:00
BUILD.bazel bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
go.mod chore/msp/runtime: disable telemetry on Google Monitoring/Trace APIs (#63049) 2024-06-03 10:58:53 -07:00
go.sum chore: Add tests documenting error invariants (#62992) 2024-06-03 19:46:53 +08:00
managedservicesplatform.go lib/managedservicesplatform: init MSP runtime, add lib/background from internal/goroutine (#57651) 2023-10-28 03:08:12 +00:00