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