BUILD 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. load(
  2. "@io_bazel_rules_go//proto:def.bzl",
  3. "go_proto_library",
  4. )
  5. package(default_visibility = ["//visibility:public"])
  6. load(
  7. "@io_bazel_rules_go//go:def.bzl",
  8. "go_library",
  9. )
  10. proto_library(
  11. name = "model_proto",
  12. srcs = ["model.proto"],
  13. tags = ["automanaged"],
  14. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  15. )
  16. go_proto_library(
  17. name = "model_go_proto",
  18. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  19. importpath = "go-common/app/service/main/rank/model",
  20. proto = ":model_proto",
  21. tags = ["automanaged"],
  22. deps = [
  23. "//library/time:go_default_library",
  24. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  25. ],
  26. )
  27. go_library(
  28. name = "go_default_library",
  29. srcs = ["model.go"],
  30. embed = [":model_go_proto"],
  31. importpath = "go-common/app/service/main/rank/model",
  32. tags = ["automanaged"],
  33. visibility = ["//visibility:public"],
  34. deps = [
  35. "//library/time:go_default_library",
  36. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  37. "@com_github_golang_protobuf//proto:go_default_library",
  38. ],
  39. )
  40. filegroup(
  41. name = "package-srcs",
  42. srcs = glob(["**"]),
  43. tags = ["automanaged"],
  44. visibility = ["//visibility:private"],
  45. )
  46. filegroup(
  47. name = "all-srcs",
  48. srcs = [":package-srcs"],
  49. tags = ["automanaged"],
  50. visibility = ["//visibility:public"],
  51. )