BUILD 1.4 KB

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