mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-11-14 17:51:25 +00:00
63 lines
2.0 KiB
Python
63 lines
2.0 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 = "secparsepb_proto",
|
|
srcs = [
|
|
"advisory.proto",
|
|
"secparse.proto",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//proto:commonpb_proto",
|
|
"@com_envoyproxy_protoc_gen_validate//validate:validate_proto",
|
|
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_proto",
|
|
"@com_google_protobuf//:timestamp_proto",
|
|
"@com_google_protobuf//:wrappers_proto",
|
|
"@go_googleapis//google/api:annotations_proto",
|
|
],
|
|
)
|
|
|
|
go_proto_library(
|
|
name = "secparsepb_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/secparse/proto/v1",
|
|
proto = ":secparsepb_proto",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//proto:common",
|
|
"@com_envoyproxy_protoc_gen_validate//validate:validate_go_proto",
|
|
"@com_github_grpc_ecosystem_grpc_gateway_v2//protoc-gen-openapiv2/options:options_go_proto",
|
|
"@go_googleapis//google/api:annotations_go_proto",
|
|
],
|
|
)
|
|
|
|
protoc_gen_openapiv2(
|
|
name = "openapi",
|
|
proto = ":secparsepb_proto",
|
|
simple_operation_ids = True,
|
|
single_output = True,
|
|
)
|
|
|
|
openapi_generator(
|
|
name = "client_typescript",
|
|
generator = "typescript-fetch",
|
|
spec = ":openapi",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
go_library(
|
|
name = "proto",
|
|
embed = [":secparsepb_go_proto"],
|
|
importpath = "peridot.resf.org/secparse/proto/v1",
|
|
visibility = ["//visibility:public"],
|
|
)
|