Skip to content

Commit

Permalink
Merge pull request #9 from TRON-US/status-refactor
Browse files Browse the repository at this point in the history
[BTFS-891]&[BTFS-939] add status server protos; prototool wire up; gogo set up
  • Loading branch information
jin-tron authored Oct 30, 2019
2 parents ea4408d + 4ebd716 commit 1cac40d
Show file tree
Hide file tree
Showing 15 changed files with 1,038 additions and 580 deletions.
17 changes: 3 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
default: lintf

PROTO_FILES=./protos/node/node.proto \
./protos/guard/guard.proto \
./protos/shared/shared.proto \
./protos/escrow/escrow.proto \
./protos/ledger/ledger.proto \
# ./protos/status/status.proto \
PB_OUT_PATH=$$GOPATH/src

install:
brew install protobuf
brew install prototool
Expand All @@ -17,8 +8,6 @@ lintf:
prototool lint ./protos
prototool format -w

build: lintf
for proto in $(PROTO_FILES); \
do \
eval protoc -I. --go_out=plugins=grpc:$(PB_OUT_PATH) $$proto ; \
done
build:
prototool all
go mod tidy
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# go-btfs-common
Common packages among various go-btfs projects

Common packages among various go-btfs projects.

| golang | protobuf | prototool |
|--------|-----------|-----------|
| 1.13 | 3.10.0 | 1.9.0 |

## File Structure

Expand All @@ -9,14 +14,29 @@ Common packages among various go-btfs projects
├── Makefile
├── README.md
├── go.mod
├── go.sum
├── info
│   └── node.go (deprecating)
├── protos
│   └── node
│   ├── node.pb.go
│   └── node.proto
├── prototool.yaml
└── tree.txt
│   ├── escrow
│   │   ├── escrow.pb.go
│   │   └── escrow.proto
│   ├── guard
│   │   ├── guard.pb.go
│   │   └── guard.proto
│   ├── ledger
│   │   ├── ledger.pb.go
│   │   └── ledger.proto
│   ├── node
│   │   ├── node.pb.go
│   │   └── node.proto
│   ├── shared
│   │   ├── shared.pb.go
│   │   └── shared.proto
│   └── status
│   ├── status.pb.go
│   └── status.proto
└── prototool.yaml
```

## Install Tools
Expand Down
7 changes: 6 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module github.com/tron-us/go-btfs-common

go 1.12
go 1.13

require (
github.com/gogo/protobuf v1.3.1
google.golang.org/grpc v1.24.0
)
32 changes: 32 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s=
google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Loading

0 comments on commit 1cac40d

Please sign in to comment.