Documentation ¶
Overview ¶
Package examplepb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package examplepb is a generated protocol buffer package.
It is generated from these files:
examples/examplepb/echo_service.proto examples/examplepb/a_bit_of_everything.proto examples/examplepb/flow_combination.proto
It has these top-level messages:
SimpleMessage
Package examplepb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package examplepb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterABitOfEverythingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterABitOfEverythingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string) (err error)
- func RegisterABitOfEverythingServiceServer(s *grpc.Server, srv ABitOfEverythingServiceServer)
- func RegisterEchoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEchoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string) (err error)
- func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer)
- func RegisterFlowCombinationHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFlowCombinationHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string) (err error)
- func RegisterFlowCombinationServer(s *grpc.Server, srv FlowCombinationServer)
- type ABitOfEverything
- type ABitOfEverythingServiceClient
- type ABitOfEverythingServiceServer
- type ABitOfEverythingService_BulkCreateClient
- type ABitOfEverythingService_BulkCreateServer
- type ABitOfEverythingService_BulkEchoClient
- type ABitOfEverythingService_BulkEchoServer
- type ABitOfEverythingService_ListClient
- type ABitOfEverythingService_ListServer
- type ABitOfEverything_Nested
- type EchoServiceClient
- type EchoServiceServer
- type EmptyMessage
- type EmptyProto
- type FlowCombinationClient
- type FlowCombinationServer
- type FlowCombination_RpcBodyStreamClient
- type FlowCombination_RpcBodyStreamServer
- type FlowCombination_RpcEmptyStreamClient
- type FlowCombination_RpcEmptyStreamServer
- type FlowCombination_RpcPathNestedStreamClient
- type FlowCombination_RpcPathNestedStreamServer
- type FlowCombination_RpcPathSingleNestedStreamClient
- type FlowCombination_RpcPathSingleNestedStreamServer
- type FlowCombination_StreamEmptyRpcClient
- type FlowCombination_StreamEmptyRpcServer
- type FlowCombination_StreamEmptyStreamClient
- type FlowCombination_StreamEmptyStreamServer
- type IdMessage
- type NestedProto
- type NonEmptyProto
- type SimpleMessage
- type SingleNestedProto
- type UnaryProto
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterABitOfEverythingServiceHandler ¶
func RegisterABitOfEverythingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterABitOfEverythingServiceHandler registers the http handlers for service ABitOfEverythingService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterABitOfEverythingServiceHandlerFromEndpoint ¶
func RegisterABitOfEverythingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string) (err error)
RegisterABitOfEverythingServiceHandlerFromEndpoint is same as RegisterABitOfEverythingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterABitOfEverythingServiceServer ¶
func RegisterABitOfEverythingServiceServer(s *grpc.Server, srv ABitOfEverythingServiceServer)
func RegisterEchoServiceHandler ¶
func RegisterEchoServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEchoServiceHandler registers the http handlers for service EchoService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEchoServiceHandlerFromEndpoint ¶
func RegisterEchoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string) (err error)
RegisterEchoServiceHandlerFromEndpoint is same as RegisterEchoServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEchoServiceServer ¶
func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer)
func RegisterFlowCombinationHandler ¶
func RegisterFlowCombinationHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterFlowCombinationHandler registers the http handlers for service FlowCombination to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFlowCombinationHandlerFromEndpoint ¶
func RegisterFlowCombinationHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string) (err error)
RegisterFlowCombinationHandlerFromEndpoint is same as RegisterFlowCombinationHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFlowCombinationServer ¶
func RegisterFlowCombinationServer(s *grpc.Server, srv FlowCombinationServer)
Types ¶
type ABitOfEverything ¶
type ABitOfEverything struct { Uuid string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"` Nested []*ABitOfEverything_Nested `protobuf:"bytes,2,rep,name=nested" json:"nested,omitempty"` FloatValue float32 `protobuf:"fixed32,3,opt,name=float_value" json:"float_value,omitempty"` DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value" json:"double_value,omitempty"` Int64Value int64 `protobuf:"varint,5,opt,name=int64_value" json:"int64_value,omitempty"` Uint64Value uint64 `protobuf:"varint,6,opt,name=uint64_value" json:"uint64_value,omitempty"` Int32Value int32 `protobuf:"varint,7,opt,name=int32_value" json:"int32_value,omitempty"` Fixed64Value uint64 `protobuf:"fixed64,8,opt,name=fixed64_value" json:"fixed64_value,omitempty"` Fixed32Value uint32 `protobuf:"fixed32,9,opt,name=fixed32_value" json:"fixed32_value,omitempty"` BoolValue bool `protobuf:"varint,10,opt,name=bool_value" json:"bool_value,omitempty"` StringValue string `protobuf:"bytes,11,opt,name=string_value" json:"string_value,omitempty"` // TODO(yugui) add bytes_value Uint32Value uint32 `protobuf:"varint,13,opt,name=uint32_value" json:"uint32_value,omitempty"` // TODO(yugui) add enum_value Sfixed32Value int32 `protobuf:"fixed32,15,opt,name=sfixed32_value" json:"sfixed32_value,omitempty"` Sfixed64Value int64 `protobuf:"fixed64,16,opt,name=sfixed64_value" json:"sfixed64_value,omitempty"` Sint32Value int32 `protobuf:"zigzag32,17,opt,name=sint32_value" json:"sint32_value,omitempty"` Sint64Value int64 `protobuf:"zigzag64,18,opt,name=sint64_value" json:"sint64_value,omitempty"` }
func (*ABitOfEverything) GetNested ¶
func (m *ABitOfEverything) GetNested() []*ABitOfEverything_Nested
func (*ABitOfEverything) ProtoMessage ¶
func (*ABitOfEverything) ProtoMessage()
func (*ABitOfEverything) Reset ¶
func (m *ABitOfEverything) Reset()
func (*ABitOfEverything) String ¶
func (m *ABitOfEverything) String() string
type ABitOfEverythingServiceClient ¶
type ABitOfEverythingServiceClient interface { Create(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) CreateBody(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*ABitOfEverything, error) BulkCreate(ctx context.Context, opts ...grpc.CallOption) (ABitOfEverythingService_BulkCreateClient, error) Lookup(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*ABitOfEverything, error) List(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (ABitOfEverythingService_ListClient, error) Update(ctx context.Context, in *ABitOfEverything, opts ...grpc.CallOption) (*EmptyMessage, error) Delete(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*EmptyMessage, error) Echo(ctx context.Context, in *gengo_grpc_gateway_examples_sub.StringMessage, opts ...grpc.CallOption) (*gengo_grpc_gateway_examples_sub.StringMessage, error) BulkEcho(ctx context.Context, opts ...grpc.CallOption) (ABitOfEverythingService_BulkEchoClient, error) }
func NewABitOfEverythingServiceClient ¶
func NewABitOfEverythingServiceClient(cc *grpc.ClientConn) ABitOfEverythingServiceClient
type ABitOfEverythingServiceServer ¶
type ABitOfEverythingServiceServer interface { Create(context.Context, *ABitOfEverything) (*ABitOfEverything, error) CreateBody(context.Context, *ABitOfEverything) (*ABitOfEverything, error) BulkCreate(ABitOfEverythingService_BulkCreateServer) error Lookup(context.Context, *IdMessage) (*ABitOfEverything, error) List(*EmptyMessage, ABitOfEverythingService_ListServer) error Update(context.Context, *ABitOfEverything) (*EmptyMessage, error) Delete(context.Context, *IdMessage) (*EmptyMessage, error) Echo(context.Context, *gengo_grpc_gateway_examples_sub.StringMessage) (*gengo_grpc_gateway_examples_sub.StringMessage, error) BulkEcho(ABitOfEverythingService_BulkEchoServer) error }
type ABitOfEverythingService_BulkCreateClient ¶
type ABitOfEverythingService_BulkCreateClient interface { Send(*ABitOfEverything) error CloseAndRecv() (*EmptyMessage, error) grpc.ClientStream }
type ABitOfEverythingService_BulkCreateServer ¶
type ABitOfEverythingService_BulkCreateServer interface { SendAndClose(*EmptyMessage) error Recv() (*ABitOfEverything, error) grpc.ServerStream }
type ABitOfEverythingService_BulkEchoClient ¶
type ABitOfEverythingService_BulkEchoClient interface { Send(*gengo_grpc_gateway_examples_sub.StringMessage) error Recv() (*gengo_grpc_gateway_examples_sub.StringMessage, error) grpc.ClientStream }
type ABitOfEverythingService_BulkEchoServer ¶
type ABitOfEverythingService_BulkEchoServer interface { Send(*gengo_grpc_gateway_examples_sub.StringMessage) error Recv() (*gengo_grpc_gateway_examples_sub.StringMessage, error) grpc.ServerStream }
type ABitOfEverythingService_ListClient ¶
type ABitOfEverythingService_ListClient interface { Recv() (*ABitOfEverything, error) grpc.ClientStream }
type ABitOfEverythingService_ListServer ¶
type ABitOfEverythingService_ListServer interface { Send(*ABitOfEverything) error grpc.ServerStream }
type ABitOfEverything_Nested ¶
type ABitOfEverything_Nested struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Amount uint32 `protobuf:"varint,2,opt,name=amount" json:"amount,omitempty"` }
func (*ABitOfEverything_Nested) ProtoMessage ¶
func (*ABitOfEverything_Nested) ProtoMessage()
func (*ABitOfEverything_Nested) Reset ¶
func (m *ABitOfEverything_Nested) Reset()
func (*ABitOfEverything_Nested) String ¶
func (m *ABitOfEverything_Nested) String() string
type EchoServiceClient ¶
type EchoServiceClient interface { Echo(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) EchoBody(ctx context.Context, in *SimpleMessage, opts ...grpc.CallOption) (*SimpleMessage, error) }
func NewEchoServiceClient ¶
func NewEchoServiceClient(cc *grpc.ClientConn) EchoServiceClient
type EchoServiceServer ¶
type EchoServiceServer interface { Echo(context.Context, *SimpleMessage) (*SimpleMessage, error) EchoBody(context.Context, *SimpleMessage) (*SimpleMessage, error) }
type EmptyMessage ¶
type EmptyMessage struct { }
func (*EmptyMessage) ProtoMessage ¶
func (*EmptyMessage) ProtoMessage()
func (*EmptyMessage) Reset ¶
func (m *EmptyMessage) Reset()
func (*EmptyMessage) String ¶
func (m *EmptyMessage) String() string
type EmptyProto ¶
type EmptyProto struct { }
func (*EmptyProto) ProtoMessage ¶
func (*EmptyProto) ProtoMessage()
func (*EmptyProto) Reset ¶
func (m *EmptyProto) Reset()
func (*EmptyProto) String ¶
func (m *EmptyProto) String() string
type FlowCombinationClient ¶
type FlowCombinationClient interface { RpcEmptyRpc(ctx context.Context, in *EmptyProto, opts ...grpc.CallOption) (*EmptyProto, error) RpcEmptyStream(ctx context.Context, in *EmptyProto, opts ...grpc.CallOption) (FlowCombination_RpcEmptyStreamClient, error) StreamEmptyRpc(ctx context.Context, opts ...grpc.CallOption) (FlowCombination_StreamEmptyRpcClient, error) StreamEmptyStream(ctx context.Context, opts ...grpc.CallOption) (FlowCombination_StreamEmptyStreamClient, error) RpcBodyRpc(ctx context.Context, in *NonEmptyProto, opts ...grpc.CallOption) (*EmptyProto, error) RpcPathSingleNestedRpc(ctx context.Context, in *SingleNestedProto, opts ...grpc.CallOption) (*EmptyProto, error) RpcPathNestedRpc(ctx context.Context, in *NestedProto, opts ...grpc.CallOption) (*EmptyProto, error) RpcBodyStream(ctx context.Context, in *NonEmptyProto, opts ...grpc.CallOption) (FlowCombination_RpcBodyStreamClient, error) RpcPathSingleNestedStream(ctx context.Context, in *SingleNestedProto, opts ...grpc.CallOption) (FlowCombination_RpcPathSingleNestedStreamClient, error) RpcPathNestedStream(ctx context.Context, in *NestedProto, opts ...grpc.CallOption) (FlowCombination_RpcPathNestedStreamClient, error) }
func NewFlowCombinationClient ¶
func NewFlowCombinationClient(cc *grpc.ClientConn) FlowCombinationClient
type FlowCombinationServer ¶
type FlowCombinationServer interface { RpcEmptyRpc(context.Context, *EmptyProto) (*EmptyProto, error) RpcEmptyStream(*EmptyProto, FlowCombination_RpcEmptyStreamServer) error StreamEmptyRpc(FlowCombination_StreamEmptyRpcServer) error StreamEmptyStream(FlowCombination_StreamEmptyStreamServer) error RpcBodyRpc(context.Context, *NonEmptyProto) (*EmptyProto, error) RpcPathSingleNestedRpc(context.Context, *SingleNestedProto) (*EmptyProto, error) RpcPathNestedRpc(context.Context, *NestedProto) (*EmptyProto, error) RpcBodyStream(*NonEmptyProto, FlowCombination_RpcBodyStreamServer) error RpcPathSingleNestedStream(*SingleNestedProto, FlowCombination_RpcPathSingleNestedStreamServer) error RpcPathNestedStream(*NestedProto, FlowCombination_RpcPathNestedStreamServer) error }
type FlowCombination_RpcBodyStreamClient ¶
type FlowCombination_RpcBodyStreamClient interface { Recv() (*EmptyProto, error) grpc.ClientStream }
type FlowCombination_RpcBodyStreamServer ¶
type FlowCombination_RpcBodyStreamServer interface { Send(*EmptyProto) error grpc.ServerStream }
type FlowCombination_RpcEmptyStreamClient ¶
type FlowCombination_RpcEmptyStreamClient interface { Recv() (*EmptyProto, error) grpc.ClientStream }
type FlowCombination_RpcEmptyStreamServer ¶
type FlowCombination_RpcEmptyStreamServer interface { Send(*EmptyProto) error grpc.ServerStream }
type FlowCombination_RpcPathNestedStreamClient ¶
type FlowCombination_RpcPathNestedStreamClient interface { Recv() (*EmptyProto, error) grpc.ClientStream }
type FlowCombination_RpcPathNestedStreamServer ¶
type FlowCombination_RpcPathNestedStreamServer interface { Send(*EmptyProto) error grpc.ServerStream }
type FlowCombination_RpcPathSingleNestedStreamClient ¶
type FlowCombination_RpcPathSingleNestedStreamClient interface { Recv() (*EmptyProto, error) grpc.ClientStream }
type FlowCombination_RpcPathSingleNestedStreamServer ¶
type FlowCombination_RpcPathSingleNestedStreamServer interface { Send(*EmptyProto) error grpc.ServerStream }
type FlowCombination_StreamEmptyRpcClient ¶
type FlowCombination_StreamEmptyRpcClient interface { Send(*EmptyProto) error CloseAndRecv() (*EmptyProto, error) grpc.ClientStream }
type FlowCombination_StreamEmptyRpcServer ¶
type FlowCombination_StreamEmptyRpcServer interface { SendAndClose(*EmptyProto) error Recv() (*EmptyProto, error) grpc.ServerStream }
type FlowCombination_StreamEmptyStreamClient ¶
type FlowCombination_StreamEmptyStreamClient interface { Send(*EmptyProto) error Recv() (*EmptyProto, error) grpc.ClientStream }
type FlowCombination_StreamEmptyStreamServer ¶
type FlowCombination_StreamEmptyStreamServer interface { Send(*EmptyProto) error Recv() (*EmptyProto, error) grpc.ServerStream }
type IdMessage ¶
type IdMessage struct {
Uuid string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"`
}
func (*IdMessage) ProtoMessage ¶
func (*IdMessage) ProtoMessage()
type NestedProto ¶
type NestedProto struct { A *UnaryProto `protobuf:"bytes,1,opt,name=a" json:"a,omitempty"` B string `protobuf:"bytes,2,opt,name=b" json:"b,omitempty"` C string `protobuf:"bytes,3,opt,name=c" json:"c,omitempty"` }
func (*NestedProto) GetA ¶
func (m *NestedProto) GetA() *UnaryProto
func (*NestedProto) ProtoMessage ¶
func (*NestedProto) ProtoMessage()
func (*NestedProto) Reset ¶
func (m *NestedProto) Reset()
func (*NestedProto) String ¶
func (m *NestedProto) String() string
type NonEmptyProto ¶
type NonEmptyProto struct { A string `protobuf:"bytes,1,opt,name=a" json:"a,omitempty"` B string `protobuf:"bytes,2,opt,name=b" json:"b,omitempty"` C string `protobuf:"bytes,3,opt,name=c" json:"c,omitempty"` }
func (*NonEmptyProto) ProtoMessage ¶
func (*NonEmptyProto) ProtoMessage()
func (*NonEmptyProto) Reset ¶
func (m *NonEmptyProto) Reset()
func (*NonEmptyProto) String ¶
func (m *NonEmptyProto) String() string
type SimpleMessage ¶
type SimpleMessage struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*SimpleMessage) ProtoMessage ¶
func (*SimpleMessage) ProtoMessage()
func (*SimpleMessage) Reset ¶
func (m *SimpleMessage) Reset()
func (*SimpleMessage) String ¶
func (m *SimpleMessage) String() string
type SingleNestedProto ¶
type SingleNestedProto struct {
A *UnaryProto `protobuf:"bytes,1,opt,name=a" json:"a,omitempty"`
}
func (*SingleNestedProto) GetA ¶
func (m *SingleNestedProto) GetA() *UnaryProto
func (*SingleNestedProto) ProtoMessage ¶
func (*SingleNestedProto) ProtoMessage()
func (*SingleNestedProto) Reset ¶
func (m *SingleNestedProto) Reset()
func (*SingleNestedProto) String ¶
func (m *SingleNestedProto) String() string
type UnaryProto ¶
type UnaryProto struct {
Str string `protobuf:"bytes,1,opt,name=str" json:"str,omitempty"`
}
func (*UnaryProto) ProtoMessage ¶
func (*UnaryProto) ProtoMessage()
func (*UnaryProto) Reset ¶
func (m *UnaryProto) Reset()
func (*UnaryProto) String ¶
func (m *UnaryProto) String() string