2023-03-09 09:23:42 -05:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
2023-08-18 08:25:14 -04:00
|
|
|
load("//bazel/go:go_test.bzl", "go_test")
|
2023-03-09 09:23:42 -05:00
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "cryptmapper",
|
2023-05-17 11:36:01 -04:00
|
|
|
srcs = [
|
|
|
|
"cryptmapper.go",
|
|
|
|
"cryptmapper_cgo.go",
|
|
|
|
"cryptmapper_cross.go",
|
|
|
|
],
|
2023-03-09 09:23:42 -05:00
|
|
|
importpath = "github.com/edgelesssys/constellation/v2/csi/cryptmapper",
|
2023-06-09 04:35:52 -04:00
|
|
|
target_compatible_with = [
|
|
|
|
"@platforms//os:linux",
|
|
|
|
],
|
2023-03-09 09:23:42 -05:00
|
|
|
visibility = ["//visibility:public"],
|
2023-07-17 07:55:31 -04:00
|
|
|
deps = [
|
|
|
|
"//internal/crypto",
|
|
|
|
"//internal/cryptsetup",
|
|
|
|
] + select({
|
2023-05-17 11:36:01 -04:00
|
|
|
"@io_bazel_rules_go//go/platform:android": [
|
|
|
|
"@com_github_martinjungblut_go_cryptsetup//:go-cryptsetup",
|
|
|
|
"@io_k8s_mount_utils//:mount-utils",
|
|
|
|
"@io_k8s_utils//exec",
|
|
|
|
],
|
|
|
|
"@io_bazel_rules_go//go/platform:linux": [
|
|
|
|
"@com_github_martinjungblut_go_cryptsetup//:go-cryptsetup",
|
|
|
|
"@io_k8s_mount_utils//:mount-utils",
|
|
|
|
"@io_k8s_utils//exec",
|
|
|
|
],
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
2023-03-09 09:23:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "cryptmapper_test",
|
|
|
|
srcs = ["cryptmapper_test.go"],
|
|
|
|
embed = [":cryptmapper"],
|
|
|
|
# keep
|
2023-08-18 08:25:14 -04:00
|
|
|
pure = "on",
|
|
|
|
# keep
|
|
|
|
race = "off",
|
2023-07-17 07:55:31 -04:00
|
|
|
deps = [
|
|
|
|
"@com_github_stretchr_testify//assert",
|
|
|
|
"@org_uber_go_goleak//:goleak",
|
|
|
|
],
|
2023-03-09 09:23:42 -05:00
|
|
|
)
|