load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//bazel/go:go_test.bzl", "go_test")

go_library(
    name = "internal",
    srcs = ["internal.go"],
    importpath = "github.com/edgelesssys/constellation/v2/internal/kms/kms/internal",
    visibility = ["//:__subpackages__"],
    deps = [
        "//internal/crypto",
        "//internal/kms/kms",
        "//internal/kms/storage",
        "@com_github_hashicorp_go_kms_wrapping_v2//:go-kms-wrapping",
    ],
)

go_test(
    name = "internal_test",
    srcs = ["internal_test.go"],
    embed = [":internal"],
    deps = [
        "//internal/kms/storage",
        "@com_github_hashicorp_go_kms_wrapping_v2//:go-kms-wrapping",
        "@com_github_hashicorp_go_kms_wrapping_wrappers_gcpckms_v2//:gcpckms",
        "@com_github_stretchr_testify//assert",
        "@com_github_stretchr_testify//require",
        "@com_google_cloud_go_kms//apiv1",
        "@org_golang_google_grpc//codes",
        "@org_golang_google_grpc//status",
        "@org_uber_go_goleak//:goleak",
    ],
)
