BUILD.bazel 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
  2. package(default_visibility = ["//visibility:public"])
  3. go_library(
  4. name = "descriptor",
  5. srcs = [
  6. "grpc_api_configuration.go",
  7. "openapi_configuration.go",
  8. "registry.go",
  9. "services.go",
  10. "types.go",
  11. ],
  12. importpath = "github.com/go-kratos/grpc-gateway/v2/internal/descriptor",
  13. deps = [
  14. "//internal/casing",
  15. "//internal/codegenerator",
  16. "//internal/descriptor/apiconfig",
  17. "//internal/descriptor/openapiconfig",
  18. "//internal/httprule",
  19. "//protoc-gen-openapiv2/options",
  20. "@com_github_ghodss_yaml//:yaml",
  21. "@com_github_golang_glog//:glog",
  22. "@go_googleapis//google/api:annotations_go_proto",
  23. "@org_golang_google_protobuf//compiler/protogen",
  24. "@org_golang_google_protobuf//encoding/protojson",
  25. "@org_golang_google_protobuf//proto",
  26. "@org_golang_google_protobuf//types/descriptorpb",
  27. "@org_golang_google_protobuf//types/pluginpb",
  28. ],
  29. )
  30. go_test(
  31. name = "descriptor_test",
  32. size = "small",
  33. srcs = [
  34. "grpc_api_configuration_test.go",
  35. "openapi_configuration_test.go",
  36. "registry_test.go",
  37. "services_test.go",
  38. "types_test.go",
  39. ],
  40. embed = [":descriptor"],
  41. deps = [
  42. "//internal/descriptor/openapiconfig",
  43. "//internal/httprule",
  44. "//protoc-gen-openapiv2/options",
  45. "@org_golang_google_protobuf//compiler/protogen",
  46. "@org_golang_google_protobuf//encoding/prototext",
  47. "@org_golang_google_protobuf//proto",
  48. "@org_golang_google_protobuf//types/descriptorpb",
  49. "@org_golang_google_protobuf//types/pluginpb",
  50. ],
  51. )
  52. alias(
  53. name = "go_default_library",
  54. actual = ":descriptor",
  55. visibility = ["//:__subpackages__"],
  56. )