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. go_library(
  11. name = "go_default_library",
  12. srcs = [
  13. "const.go",
  14. "message.go",
  15. "model.go",
  16. ],
  17. embed = [":model_go_proto"],
  18. importpath = "go-common/app/job/main/passport-sns/model",
  19. tags = ["automanaged"],
  20. visibility = ["//visibility:public"],
  21. deps = [
  22. "@com_github_gogo_protobuf//gogoproto:go_default_library",
  23. "@com_github_golang_protobuf//proto:go_default_library",
  24. ],
  25. )
  26. filegroup(
  27. name = "package-srcs",
  28. srcs = glob(["**"]),
  29. tags = ["automanaged"],
  30. visibility = ["//visibility:private"],
  31. )
  32. filegroup(
  33. name = "all-srcs",
  34. srcs = [":package-srcs"],
  35. tags = ["automanaged"],
  36. visibility = ["//visibility:public"],
  37. )
  38. proto_library(
  39. name = "model_proto",
  40. srcs = ["sns.proto"],
  41. tags = ["automanaged"],
  42. deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
  43. )
  44. go_proto_library(
  45. name = "model_go_proto",
  46. compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
  47. importpath = "go-common/app/job/main/passport-sns/model",
  48. proto = ":model_proto",
  49. tags = ["automanaged"],
  50. deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
  51. )