peridot/peridot/proto/v1/BUILD.bazel
Mustafa Gezen 496b60ba44
Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support
Signed-off-by: Mustafa Gezen <mustafa@ctrliq.com>
2022-08-31 20:06:01 +02:00

91 lines
2.7 KiB
Python

load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2:defs.bzl", "protoc_gen_openapiv2")
load("@openapi_tools_generator_bazel//:defs.bzl", "openapi_generator")
proto_library(
name = "peridotpb_proto",
srcs = [
"batch.proto",
"build.proto",
"catalog.proto",
"import.proto",
"module.proto",
"package.proto",
"project.proto",
"rpm.proto",
"search.proto",
"task.proto",
],
visibility = ["//visibility:public"],
deps = [
"//peridot/proto/v1/yumrepofs:yumrepofspb_proto",
"@com_envoyproxy_protoc_gen_validate//validate:validate_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:descriptor_proto",
"@com_google_protobuf//:timestamp_proto",
"@com_google_protobuf//:wrappers_proto",
"@go_googleapis//google/api:annotations_proto",
"@go_googleapis//google/api:httpbody_proto",
"@go_googleapis//google/rpc:errdetails_proto",
],
)
go_proto_library(
name = "peridotpb_go_proto",
compilers = [
"//:go_apiv2",
"//:go_grpc",
"//:go_validate",
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-grpc-gateway:go_gen_grpc_gateway",
],
importpath = "peridot.resf.org/peridot/pb",
proto = ":peridotpb_proto",
visibility = ["//visibility:public"],
deps = [
"//peridot/proto/v1/yumrepofs:pb",
"@com_envoyproxy_protoc_gen_validate//validate:validate_go_proto",
"@go_googleapis//google/api:annotations_go_proto",
"@go_googleapis//google/api:httpbody_go_proto",
"@go_googleapis//google/rpc:errdetails_go_proto",
],
)
protoc_gen_openapiv2(
name = "openapi",
proto = ":peridotpb_proto",
simple_operation_ids = True,
single_output = True,
)
openapi_generator(
name = "client_typescript",
additional_properties = {
"withoutRuntimeChecks": "true",
"typescriptThreePlus": "true",
},
generator = "typescript-fetch",
spec = ":openapi",
visibility = ["//visibility:public"],
)
openapi_generator(
name = "client_go",
additional_properties = {
"packageName": "peridotopenapi",
"generateInterfaces": "true",
"hideGenerationTimestamp": "true",
},
generator = "go",
spec = ":openapi",
visibility = ["//visibility:public"],
)
go_library(
name = "pb",
embed = [":peridotpb_go_proto"],
importpath = "peridot.resf.org/peridot/pb",
visibility = ["//visibility:public"],
)