Documentation ¶
Overview ¶
Package model is a generated protocol buffer package.
It is generated from these files:
model.proto
It has these top-level messages:
ExampleRequest ExampleResponse
Package model is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterExampleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterExampleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterExampleServiceServer(s *grpc.Server, srv ExampleServiceServer)
- type ExampleRequest
- type ExampleResponse
- type ExampleServiceClient
- type ExampleServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterExampleServiceHandler ¶
func RegisterExampleServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterExampleServiceHandler registers the http handlers for service ExampleService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterExampleServiceHandlerFromEndpoint ¶
func RegisterExampleServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterExampleServiceHandlerFromEndpoint is same as RegisterExampleServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterExampleServiceServer ¶
func RegisterExampleServiceServer(s *grpc.Server, srv ExampleServiceServer)
Types ¶
type ExampleRequest ¶
type ExampleRequest struct {
Message string `protobuf:"bytes,1,opt,name=Message" json:"Message,omitempty"`
}
func (*ExampleRequest) Descriptor ¶
func (*ExampleRequest) Descriptor() ([]byte, []int)
func (*ExampleRequest) GetMessage ¶
func (m *ExampleRequest) GetMessage() string
func (*ExampleRequest) ProtoMessage ¶
func (*ExampleRequest) ProtoMessage()
func (*ExampleRequest) Reset ¶
func (m *ExampleRequest) Reset()
func (*ExampleRequest) String ¶
func (m *ExampleRequest) String() string
type ExampleResponse ¶
type ExampleResponse struct {
Message string `protobuf:"bytes,1,opt,name=Message" json:"Message,omitempty"`
}
func (*ExampleResponse) Descriptor ¶
func (*ExampleResponse) Descriptor() ([]byte, []int)
func (*ExampleResponse) GetMessage ¶
func (m *ExampleResponse) GetMessage() string
func (*ExampleResponse) ProtoMessage ¶
func (*ExampleResponse) ProtoMessage()
func (*ExampleResponse) Reset ¶
func (m *ExampleResponse) Reset()
func (*ExampleResponse) String ¶
func (m *ExampleResponse) String() string
type ExampleServiceClient ¶
type ExampleServiceClient interface {
Echo(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error)
}
func NewExampleServiceClient ¶
func NewExampleServiceClient(cc *grpc.ClientConn) ExampleServiceClient
type ExampleServiceServer ¶
type ExampleServiceServer interface {
Echo(context.Context, *ExampleRequest) (*ExampleResponse, error)
}
Click to show internal directories.
Click to hide internal directories.