Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
events service (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitiko authored May 27, 2020
1 parent d6a6bba commit 184510b
Show file tree
Hide file tree
Showing 7 changed files with 510 additions and 0 deletions.
22 changes: 22 additions & 0 deletions gateway/events/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

.: generate

GOFLAGS ?= -mod=vendor

test:
@go test -ginkgo.failFast

generate: clean
@echo "event service proto generation"
@protoc -I=. \
-I=../../../ \
-I=../../vendor \
-I=../../third_party/googleapis \
--go_out=plugins=grpc:. \
--grpc-gateway_out=logtostderr=true:. \
--swagger_out=logtostderr=true:. \
--doc_out=markdown,event.pb.md:. \
./*.proto

clean:
@rm -f *.swagger.json *.pb.md *.validator.pb.go *.pb.go *.pb.gw.go *.pb.cc.go
144 changes: 144 additions & 0 deletions gateway/events/event.pb.go

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

116 changes: 116 additions & 0 deletions gateway/events/event.pb.gw.go

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

62 changes: 62 additions & 0 deletions gateway/events/event.pb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Protocol Documentation
<a name="top"></a>

## Table of Contents

- [event.proto](#event.proto)



- [ChaincodeEvent](#events.ChaincodeEvent)


- [Scalar Value Types](#scalar-value-types)



<a name="event.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## event.proto









<a name="events.ChaincodeEvent"></a>

### ChaincodeEvent


| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| EventStream | [.google.protobuf.Empty](#google.protobuf.Empty) | [.protos.ChaincodeEvent](#protos.ChaincodeEvent) stream | |





## Scalar Value Types

| .proto Type | Notes | C++ Type | Java Type | Python Type |
| ----------- | ----- | -------- | --------- | ----------- |
| <a name="double" /> double | | double | double | float |
| <a name="float" /> float | | float | float | float |
| <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int |
| <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long |
| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long |
| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long |
| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int |
| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long |
| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int |
| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long |
| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int |
| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long |
| <a name="bool" /> bool | | bool | boolean | boolean |
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode |
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

17 changes: 17 additions & 0 deletions gateway/events/event.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";

package events;

option go_package = ".;events";

import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "github.com/hyperledger/fabric/protos/peer/chaincode_event.proto";

service ChaincodeEvent {
rpc EventStream (google.protobuf.Empty) returns (stream protos.ChaincodeEvent) {
option (google.api.http) = {
get: "/event"
};
};
}
Loading

0 comments on commit 184510b

Please sign in to comment.