cloud/{apigw,lib/component}: add cockroachdb client, sample schema
This sets up some boilerplate to connect to CockroachDB servers,
including test in-memory servers.
We also add a first pass apigw user table schema, as the first user of
this new functionality. We exercise that, in turn, in a test.
We also rename component.Configuration to component.ComponentConfig.
There's a stutter in there, but it makes sense with
component.CockroachConfig alongside.
Change-Id: I76691146b87ce135d60db179b3f51eee16525df7
Reviewed-on: https://review.monogon.dev/c/monogon/+/912
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Vouch-Run-CI: Leopold Schabel <leo@monogon.tech>
Tested-by: Jenkins CI
diff --git a/cloud/apigw/server/BUILD.bazel b/cloud/apigw/server/BUILD.bazel
index 2444267..246efff 100644
--- a/cloud/apigw/server/BUILD.bazel
+++ b/cloud/apigw/server/BUILD.bazel
@@ -7,6 +7,7 @@
visibility = ["//visibility:public"],
deps = [
"//cloud/api",
+ "//cloud/apigw/model",
"//cloud/lib/component",
"@com_github_improbable_eng_grpc_web//go/grpcweb",
"@io_k8s_klog_v2//:klog",
@@ -21,9 +22,13 @@
go_test(
name = "server_test",
srcs = ["server_test.go"],
+ data = [
+ "@cockroach",
+ ],
embed = [":server"],
deps = [
"//cloud/api",
+ "//cloud/apigw/model",
"//cloud/lib/component",
"@org_golang_google_grpc//codes",
"@org_golang_google_protobuf//proto",