Rename js-grpc folder, add enums to example file
This commit is contained in:
parent
a8d641cd8d
commit
ab2a5d5181
2
Makefile
2
Makefile
@ -9,7 +9,7 @@ install:
|
|||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: build
|
test: build
|
||||||
cd examples/dummy && make
|
cd examples/dummy && make
|
||||||
cd examples/js-grpc && make
|
cd examples/flow && make
|
||||||
|
|
||||||
.PHONY: docker.build
|
.PHONY: docker.build
|
||||||
docker.build:
|
docker.build:
|
||||||
|
@ -3,7 +3,10 @@
|
|||||||
|
|
||||||
import grpc from 'grpc'
|
import grpc from 'grpc'
|
||||||
import pbFile from './pbFile.js'
|
import pbFile from './pbFile.js'
|
||||||
|
type TestEnum =
|
||||||
|
| 'ELEMENT_A'
|
||||||
|
| 'ELEMENT_B'
|
||||||
|
;
|
||||||
|
|
||||||
type TestMessage = {|
|
type TestMessage = {|
|
||||||
a?: string;
|
a?: string;
|
||||||
@ -16,6 +19,10 @@ type TestMessage = {|
|
|||||||
p?: Array<number>;
|
p?: Array<number>;
|
||||||
q?: Array<number>;
|
q?: Array<number>;
|
||||||
r?: Array<number>;
|
r?: Array<number>;
|
||||||
|
s?:
|
||||||
|
| 'ELEMENT_C'
|
||||||
|
| 'ELEMENT_D'
|
||||||
|
;
|
||||||
|};
|
|};
|
||||||
|
|
||||||
type TestNoStreamRequest = {|
|
type TestNoStreamRequest = {|
|
@ -11,6 +11,11 @@ service TestService {
|
|||||||
rpc TestStreamBoth(stream TestStreamBothRequest) returns (stream TestStreamBothReply);
|
rpc TestStreamBoth(stream TestStreamBothRequest) returns (stream TestStreamBothReply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum TestEnum {
|
||||||
|
ELEMENT_A = 0;
|
||||||
|
ELEMENT_B = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message TestMessage {
|
message TestMessage {
|
||||||
string a = 1;
|
string a = 1;
|
||||||
int32 b = 2;
|
int32 b = 2;
|
||||||
@ -22,6 +27,10 @@ message TestMessage {
|
|||||||
repeated int64 p = 16;
|
repeated int64 p = 16;
|
||||||
repeated float q = 17;
|
repeated float q = 17;
|
||||||
repeated double r = 18;
|
repeated double r = 18;
|
||||||
|
enum s {
|
||||||
|
ELEMENT_C = 0;
|
||||||
|
ELEMENT_D = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message TestNoStreamRequest { TestMessage message = 1; }
|
message TestNoStreamRequest { TestMessage message = 1; }
|
Loading…
Reference in New Issue
Block a user