load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "edgeencrypt", srcs = [ "api.go", "bearer_token.go", "decrypt.go", "encrypt.go", "kms.go", "middleware.go", "pki.go", "rsa.go", ], importpath = "edge-infra.dev/pkg/edge/edgeencrypt", visibility = ["//visibility:public"], deps = [ "//pkg/lib/fog", "@com_github_gin_contrib_requestid//:requestid", "@com_github_gin_gonic_gin//:gin", "@com_github_go_logr_logr//:logr", "@com_github_golang_jwt_jwt//:jwt", "@com_github_penglongli_gin_metrics//ginmetrics", "@com_google_cloud_go_kms//apiv1", "@com_google_cloud_go_kms//apiv1/kmspb", "@io_k8s_api//core/v1:core", "@io_k8s_apimachinery//pkg/apis/meta/v1:meta", "@io_k8s_sigs_controller_runtime//pkg/client", "@org_golang_google_protobuf//types/known/wrapperspb", ], ) go_test( name = "edgeencrypt_test", srcs = [ "api_test.go", "bearer_token_test.go", "encrypt_test.go", "kms_test.go", "rsa_test.go", ], data = glob(["testdata/**"]), embed = [":edgeencrypt"], embedsrcs = ["testdata/tlog.json"], deps = [ "@com_github_golang_jwt_jwt//:jwt", "@com_github_google_uuid//:uuid", "@com_google_cloud_go_kms//apiv1", "@com_google_cloud_go_kms//apiv1/kmspb", ], )