examplepb

package
v0.0.0-...-485354f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2015 License: BSD-3-Clause Imports: 11 Imported by: 0

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

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 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_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 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()

func (*IdMessage) Reset

func (m *IdMessage) Reset()

func (*IdMessage) String

func (m *IdMessage) String() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL