-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from s7techlab/services-refactoring
services refactoring
- Loading branch information
Showing
144 changed files
with
9,931 additions
and
2,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
GOFLAGS ?= -mod=vendor | ||
|
||
PROTO_PACKAGES_GO := proto | ||
PROTO_PACKAGES_SVC := service | ||
|
||
test: | ||
@echo "go test -mod vendor ./..." | ||
@go test ./... | ||
|
||
proto: clean | ||
@for pkg in $(PROTO_PACKAGES_GO) ;do echo $$pkg && buf generate --template buf.gen.go.yaml $$pkg -o ./$$(echo $$pkg | cut -d "/" -f1); done | ||
@for pkg in $(PROTO_PACKAGES_SVC) ;do echo $$pkg && buf generate --template buf.gen.svc.yaml $$pkg -o ./$$(echo $$pkg | cut -d "/" -f1); done | ||
|
||
clean: | ||
@for pkg in $(PROTO_PACKAGES_GO); do find $$pkg \( -name '*.pb.go' -or -name '*.pb.md' \) -delete;done | ||
@for pkg in $(PROTO_PACKAGES_SVC); do find $$pkg \( -name '*.pb.go' -or -name '*.pb.cc.go' -or -name '*.pb.gw.go' -or -name '*.swagger.json' -or -name '*.pb.md' \) -delete;done |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package api | ||
|
||
import ( | ||
"context" | ||
) | ||
|
||
type Channel interface { | ||
// Chaincode returns chaincode instance by chaincode name | ||
Chaincode(ctx context.Context, name string) (Chaincode, error) | ||
// Join channel | ||
Join(ctx context.Context) error | ||
} | ||
|
||
// types which identify tx "wait'er" policy | ||
// we don't make it as alias for preventing binding to our lib | ||
const ( | ||
TxWaiterSelfType string = "self" | ||
TxWaiterAllType string = "all" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: v1 | ||
|
||
plugins: | ||
|
||
- name: go | ||
path: .generators/bin/protoc-gen-go | ||
out: . | ||
opt: | ||
- plugins=grpc | ||
- paths=source_relative | ||
|
||
- name: go-validate | ||
path: .generators/bin/protoc-gen-validate | ||
out: . | ||
opt: | ||
- paths=source_relative | ||
- lang=go | ||
|
||
- name: swagger | ||
path: .generators/bin/protoc-gen-swagger | ||
out: . | ||
opt: | ||
- logtostderr=true | ||
|
||
- name: grpc-gateway | ||
path: .generators/bin/protoc-gen-grpc-gateway | ||
out: . | ||
opt: | ||
- logtostderr=true | ||
- paths=source_relative |
Oops, something went wrong.