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

package(default_visibility = ["//:__subpackages__"])

licenses(["notice"])  # keep

go_library(
    name = "gcpkms",
    srcs = [
        "gcp_kms_aead.go",
        "gcp_kms_client.go",
    ],
    importpath = "github.com/google/tink/go/integration/gcpkms",
    visibility = ["//visibility:public"],
    deps = [
        "//core/registry",
        "//tink",
        "@org_golang_google_api//cloudkms/v1:cloudkms",
        "@org_golang_google_api//option",
        "@org_golang_x_oauth2//:oauth2",
        "@org_golang_x_oauth2//google",
    ],
)

go_test(
    name = "gcpkms_test",
    srcs = [
        "gcp_kms_aead_test.go",
        "gcp_kms_client_test.go",
    ],
    data = [
        # Credentials can be injected into the test files included in these
        # targets.
        "//testdata/gcp:credentials",
        "//testdata/keysets:ecies",
        "@google_root_pem//file",  #keep
        "@wycheproof//testvectors:all",  #keep
    ],
    tags = ["manual"],
    deps = [
        ":gcpkms",
        "//aead",
        "//core/registry",
        "//keyset",
        "//subtle/random",
        "//tink",
    ],
)

alias(
    name = "go_default_library",
    actual = ":gcpkms",
    visibility = ["//visibility:public"],
)
