-
Notifications
You must be signed in to change notification settings - Fork 5
/
BUILD.bazel
67 lines (61 loc) · 1.86 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@io_bazel_rules_go//proto:compiler.bzl", "go_proto_compiler")
load("@rules_proto//proto:defs.bzl", "proto_library")
filegroup(
name = "logfields",
srcs = ["logfields.proto"],
visibility = ["//visibility:public"],
)
proto_library(
name = "logfields_proto",
srcs = [":logfields"],
import_prefix = "github.com/improbable-io/go-proto-logfields",
deps = [
"@com_google_protobuf//:descriptor_proto",
],
visibility = ["//visibility:public"],
)
go_proto_compiler(
name = "gogo_proto_logfields",
plugin = "//protoc-gen-gologfields",
deps = [
"//:go_default_library",
"@com_github_gogo_protobuf//protoc-gen-gogo/descriptor:go_default_library",
],
options = ["gogoimport=true"],
suffix = ".logfields.pb.go",
valid_archive = False,
visibility = ["//visibility:public"],
)
go_proto_compiler(
name = "go_proto_logfields",
plugin = "//protoc-gen-gologfields",
deps = [
"//:go_default_library",
"@com_github_golang_protobuf//protoc-gen-go/descriptor:go_default_library",
],
options = ["gogoimport=false"],
suffix = ".logfields.pb.go",
valid_archive = False,
visibility = ["//visibility:public"],
)
go_proto_library(
name = "_logfields",
importpath = "github.com/improbable-io/go-proto-logfields",
proto = ":logfields_proto",
compilers = [
"@io_bazel_rules_go//proto:gogo_proto",
],
deps = [
"@com_github_gogo_protobuf//protoc-gen-gogo/descriptor:go_default_library",
],
visibility = ["//:__pkg__"],
)
go_library(
name = "go_default_library",
importpath = "github.com/improbable-io/go-proto-logfields",
srcs = ["extract.go"],
embed = [":_logfields"],
visibility = ["//visibility:public"],
)