Skip to content

Commit

Permalink
story(proto): generate go code for protobuf (#76)
Browse files Browse the repository at this point in the history
* chore(proto): generate all go code for better dev experience

* chore(go): tidied up deps
  • Loading branch information
Zaba505 authored Oct 27, 2022
1 parent 6f8eb5d commit c0cdd72
Show file tree
Hide file tree
Showing 8 changed files with 956 additions and 10 deletions.
10 changes: 7 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@ module github.com/z5labs/megamind
go 1.19

require (
github.com/gin-gonic/gin v1.8.1
github.com/spf13/cobra v1.5.0
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.8.0
go.uber.org/zap v1.23.0
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
google.golang.org/grpc v1.46.2
google.golang.org/protobuf v1.28.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.8.1 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.10.0 // indirect
github.com/goccy/go-json v0.9.7 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand All @@ -33,7 +38,6 @@ require (
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
go.uber.org/atomic v1.7.0 // indirect
Expand All @@ -42,7 +46,7 @@ require (
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
36 changes: 33 additions & 3 deletions go.sum

Large diffs are not rendered by default.

57 changes: 53 additions & 4 deletions go_dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ def go_dependencies():
sum = "h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=",
version = "v0.0.1-2020.1.4",
)
go_repository(
name = "com_github_antihax_optional",
importpath = "github.com/antihax/optional",
sum = "h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=",
version = "v1.0.0",
)

go_repository(
name = "com_github_armon_go_metrics",
importpath = "github.com/armon/go-metrics",
Expand Down Expand Up @@ -37,6 +44,13 @@ def go_dependencies():
sum = "h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=",
version = "v0.2.1",
)
go_repository(
name = "com_github_cespare_xxhash_v2",
importpath = "github.com/cespare/xxhash/v2",
sum = "h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=",
version = "v2.1.1",
)

go_repository(
name = "com_github_chzyer_logex",
importpath = "github.com/chzyer/logex",
Expand Down Expand Up @@ -64,9 +78,16 @@ def go_dependencies():
go_repository(
name = "com_github_cncf_udpa_go",
importpath = "github.com/cncf/udpa/go",
sum = "h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M=",
version = "v0.0.0-20201120205902-5459f2c99403",
sum = "h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI=",
version = "v0.0.0-20210930031921-04548b0d99d4",
)
go_repository(
name = "com_github_cncf_xds_go",
importpath = "github.com/cncf/xds/go",
sum = "h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw=",
version = "v0.0.0-20211011173535-cb28da3451f1",
)

go_repository(
name = "com_github_coreos_go_semver",
importpath = "github.com/coreos/go-semver",
Expand Down Expand Up @@ -101,8 +122,8 @@ def go_dependencies():
go_repository(
name = "com_github_envoyproxy_go_control_plane",
importpath = "github.com/envoyproxy/go-control-plane",
sum = "h1:EmNYJhPYy0pOFjCx2PrgtaBXmee0iUX9hLlxE1xHOJE=",
version = "v0.9.9-0.20201210154907-fd9021fe5dad",
sum = "h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0=",
version = "v0.10.2-0.20220325020618-49ff273808a1",
)
go_repository(
name = "com_github_envoyproxy_protoc_gen_validate",
Expand All @@ -128,6 +149,13 @@ def go_dependencies():
sum = "h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=",
version = "v1.5.4",
)
go_repository(
name = "com_github_ghodss_yaml",
importpath = "github.com/ghodss/yaml",
sum = "h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=",
version = "v1.0.0",
)

go_repository(
name = "com_github_gin_contrib_sse",
importpath = "github.com/gin-contrib/sse",
Expand Down Expand Up @@ -275,6 +303,13 @@ def go_dependencies():
sum = "h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4=",
version = "v0.0.0-20200911160855-bcd43fbb19e8",
)
go_repository(
name = "com_github_grpc_ecosystem_grpc_gateway",
importpath = "github.com/grpc-ecosystem/grpc-gateway",
sum = "h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=",
version = "v1.16.0",
)

go_repository(
name = "com_github_hashicorp_consul_api",
importpath = "github.com/hashicorp/consul/api",
Expand Down Expand Up @@ -469,6 +504,13 @@ def go_dependencies():
sum = "h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=",
version = "v0.0.0-20190812154241-14fe0d1b01d4",
)
go_repository(
name = "com_github_rogpeppe_fastuuid",
importpath = "github.com/rogpeppe/fastuuid",
sum = "h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=",
version = "v1.2.0",
)

go_repository(
name = "com_github_rogpeppe_go_internal",
importpath = "github.com/rogpeppe/go-internal",
Expand Down Expand Up @@ -668,6 +710,13 @@ def go_dependencies():
sum = "h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=",
version = "v0.23.0",
)
go_repository(
name = "io_opentelemetry_go_proto_otlp",
importpath = "go.opentelemetry.io/proto/otlp",
sum = "h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8=",
version = "v0.7.0",
)

go_repository(
name = "io_rsc_binaryregexp",
importpath = "rsc.io/binaryregexp",
Expand Down
166 changes: 166 additions & 0 deletions services/ingest/proto/service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions services/ingest/proto/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ syntax = "proto3";

package proto;

option go_package = "github.com/z5labs/megamind/services/ingest/proto";

import "subgraph/subgraph.proto";

service SubgraphIngest {
Expand Down
Loading

0 comments on commit c0cdd72

Please sign in to comment.