BUILD 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 = ["dm.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/job/main/dm/model",
  20. proto = ":model_proto",
  21. tags = ["manual"],
  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 = [
  30. "dm.go",
  31. "job.go",
  32. "subject.go",
  33. ],
  34. embed = [":model_go_proto"],
  35. importpath = "go-common/app/job/main/dm/model",
  36. tags = ["automanaged"],
  37. visibility = ["//visibility:public"],
  38. deps = [
  39. "//library/time:go_default_library",
  40. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  41. "@com_github_golang_protobuf//proto:go_default_library",
  42. ],
  43. )
  44. filegroup(
  45. name = "package-srcs",
  46. srcs = glob(["**"]),
  47. tags = ["automanaged"],
  48. visibility = ["//visibility:private"],
  49. )
  50. filegroup(
  51. name = "all-srcs",
  52. srcs = [":package-srcs"],
  53. tags = ["automanaged"],
  54. visibility = ["//visibility:public"],
  55. )