Documentation ¶
Overview ¶
Package proto is a generated protocol buffer package.
It is generated from these files:
hello.proto
It has these top-level messages:
HelloWorldRequest HelloWorldResponse
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterHelloWorldHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterHelloWorldHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HelloWorldClient) error
- func RegisterHelloWorldHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterHelloWorldServer(s *grpc.Server, srv HelloWorldServer)
- type HelloWorldClient
- type HelloWorldRequest
- type HelloWorldResponse
- type HelloWorldServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHelloWorldHandler ¶
func RegisterHelloWorldHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterHelloWorldHandler registers the http handlers for service HelloWorld to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterHelloWorldHandlerClient ¶
func RegisterHelloWorldHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HelloWorldClient) error
RegisterHelloWorldHandler registers the http handlers for service HelloWorld to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HelloWorldClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HelloWorldClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "HelloWorldClient" to call the correct interceptors.
func RegisterHelloWorldHandlerFromEndpoint ¶
func RegisterHelloWorldHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterHelloWorldHandlerFromEndpoint is same as RegisterHelloWorldHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterHelloWorldServer ¶
func RegisterHelloWorldServer(s *grpc.Server, srv HelloWorldServer)
Types ¶
type HelloWorldClient ¶
type HelloWorldClient interface {
SayHelloWorld(ctx context.Context, in *HelloWorldRequest, opts ...grpc.CallOption) (*HelloWorldResponse, error)
}
func NewHelloWorldClient ¶
func NewHelloWorldClient(cc *grpc.ClientConn) HelloWorldClient
type HelloWorldRequest ¶
type HelloWorldRequest struct {
Referer string `protobuf:"bytes,1,opt,name=referer" json:"referer,omitempty"`
}
func (*HelloWorldRequest) Descriptor ¶
func (*HelloWorldRequest) Descriptor() ([]byte, []int)
func (*HelloWorldRequest) GetReferer ¶
func (m *HelloWorldRequest) GetReferer() string
func (*HelloWorldRequest) ProtoMessage ¶
func (*HelloWorldRequest) ProtoMessage()
func (*HelloWorldRequest) Reset ¶
func (m *HelloWorldRequest) Reset()
func (*HelloWorldRequest) String ¶
func (m *HelloWorldRequest) String() string
type HelloWorldResponse ¶
type HelloWorldResponse struct {
Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}
func (*HelloWorldResponse) Descriptor ¶
func (*HelloWorldResponse) Descriptor() ([]byte, []int)
func (*HelloWorldResponse) GetMessage ¶
func (m *HelloWorldResponse) GetMessage() string
func (*HelloWorldResponse) ProtoMessage ¶
func (*HelloWorldResponse) ProtoMessage()
func (*HelloWorldResponse) Reset ¶
func (m *HelloWorldResponse) Reset()
func (*HelloWorldResponse) String ¶
func (m *HelloWorldResponse) String() string
type HelloWorldServer ¶
type HelloWorldServer interface {
SayHelloWorld(context.Context, *HelloWorldRequest) (*HelloWorldResponse, error)
}