blob: 761baef66f462c37eef7995c222a8debeedfac58 [file] [log] [blame]
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "bmdb",
srcs = [
"bmdb.go",
"connection.go",
"sessions.go",
],
importpath = "source.monogon.dev/cloud/bmaas/bmdb",
visibility = ["//visibility:public"],
deps = [
"//cloud/bmaas/bmdb/model",
"//cloud/bmaas/bmdb/reflection",
"//cloud/lib/component",
"@com_github_cockroachdb_cockroach_go_v2//crdb",
"@com_github_google_uuid//:uuid",
"@com_github_lib_pq//:pq",
"@io_k8s_klog_v2//:klog",
],
)
go_test(
name = "bmdb_test",
srcs = [
"backoff_test.go",
"migrations_test.go",
"queries_test.go",
"reflection_test.go",
"sessions_test.go",
],
data = [
"@cockroach",
],
embed = [":bmdb"],
deps = [
"//cloud/agent/api",
"//cloud/bmaas/bmdb/model",
"//cloud/bmaas/bmdb/reflection",
"//cloud/bmaas/server/api",
"//cloud/lib/component",
"@com_github_google_go_cmp//cmp",
"@com_github_google_uuid//:uuid",
"@org_golang_google_protobuf//proto",
],
)