Skip to content

Commit

Permalink
Merge pull request #31 from berty/dev/moul/initial-p2p-api-definitions
Browse files Browse the repository at this point in the history
Initial P2P API definitions
  • Loading branch information
moul committed Jul 25, 2018
2 parents 84eb99a + 734020d commit 528275a
Show file tree
Hide file tree
Showing 12 changed files with 3,588 additions and 0 deletions.
106 changes: 106 additions & 0 deletions Gopkg.lock

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

29 changes: 29 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true

[prune]
go-tests = true
unused-packages = true
23 changes: 23 additions & 0 deletions core/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
GOPATH ?= $(HOME)/go
CODE_PATHS = $(filter-out node_modules/,$(wildcard */))
PROTOS = $(call rwildcard, $(CODE_PATHS), *.proto)
GENERATED_FILES = $(patsubst %.proto,%.pb.go,$(PROTOS))
PROTOC_OPTS = --proto_path=../vendor:../vendor/github.com/gogo/protobuf:.

.PHONY: all
all: test

.PHONY: test
test: generate
go test -test.timeout 30s -v ./...

%.pb.go: %.proto
protoc $(PROTOC_OPTS) --gofast_out=plugins=grpc:"$(GOPATH)/src" "$(dir $<)"/*.proto

.PHONY: clean
clean:
rm -f $(GENERATED_FILES)

.PHONY: generate
generate: $(GENERATED_FILES)

0 comments on commit 528275a

Please sign in to comment.