2023-03-09 09:23:42 -05:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
2023-12-11 02:08:55 -05:00
|
|
|
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
|
|
|
|
load("@rules_proto//proto:defs.bzl", "proto_library")
|
2023-12-15 09:45:52 -05:00
|
|
|
load("//bazel/go:go_test.bzl", "go_test")
|
2023-12-11 02:08:55 -05:00
|
|
|
load("//bazel/proto:rules.bzl", "write_go_proto_srcs")
|
2023-03-09 09:23:42 -05:00
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "components",
|
|
|
|
srcs = ["components.go"],
|
2023-12-11 02:08:55 -05:00
|
|
|
embed = [":components_go_proto"],
|
2023-03-09 09:23:42 -05:00
|
|
|
importpath = "github.com/edgelesssys/constellation/v2/internal/versions/components",
|
|
|
|
visibility = ["//:__subpackages__"],
|
2023-12-11 02:08:55 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
proto_library(
|
|
|
|
name = "components_proto",
|
|
|
|
srcs = ["components.proto"],
|
|
|
|
visibility = ["//:__subpackages__"],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_proto_library(
|
|
|
|
name = "components_go_proto",
|
|
|
|
importpath = "github.com/edgelesssys/constellation/v2/internal/versions/components",
|
|
|
|
proto = ":components_proto",
|
|
|
|
visibility = ["//:__subpackages__"],
|
|
|
|
)
|
|
|
|
|
|
|
|
write_go_proto_srcs(
|
|
|
|
name = "write_generated_protos",
|
|
|
|
src = "components.pb.go",
|
|
|
|
go_proto_library = ":components_go_proto",
|
|
|
|
visibility = ["//visibility:public"],
|
2023-03-09 09:23:42 -05:00
|
|
|
)
|
2023-12-15 09:45:52 -05:00
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "components_test",
|
|
|
|
srcs = ["components_test.go"],
|
|
|
|
embed = [":components"],
|
|
|
|
deps = [
|
|
|
|
"@com_github_stretchr_testify//assert",
|
|
|
|
"@com_github_stretchr_testify//require",
|
|
|
|
],
|
|
|
|
)
|