Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEchoResourceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEchoResourceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EchoResourceServiceClient) error
- func RegisterEchoResourceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEchoResourceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EchoResourceServiceServer) error
- func RegisterEchoResourceServiceServer(s grpc.ServiceRegistrar, srv EchoResourceServiceServer)
- type EchoResourceBiDiRequest
- func (*EchoResourceBiDiRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EchoResourceBiDiRequest) GetMessage() string
- func (x *EchoResourceBiDiRequest) GetName() string
- func (*EchoResourceBiDiRequest) ProtoMessage()
- func (x *EchoResourceBiDiRequest) ProtoReflect() protoreflect.Message
- func (x *EchoResourceBiDiRequest) Reset()
- func (x *EchoResourceBiDiRequest) String() string
- type EchoResourceBiDiResponse
- func (*EchoResourceBiDiResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EchoResourceBiDiResponse) GetMessage() string
- func (*EchoResourceBiDiResponse) ProtoMessage()
- func (x *EchoResourceBiDiResponse) ProtoReflect() protoreflect.Message
- func (x *EchoResourceBiDiResponse) Reset()
- func (x *EchoResourceBiDiResponse) String() string
- type EchoResourceMultipleRequest
- func (*EchoResourceMultipleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EchoResourceMultipleRequest) GetMessage() string
- func (x *EchoResourceMultipleRequest) GetName() string
- func (*EchoResourceMultipleRequest) ProtoMessage()
- func (x *EchoResourceMultipleRequest) ProtoReflect() protoreflect.Message
- func (x *EchoResourceMultipleRequest) Reset()
- func (x *EchoResourceMultipleRequest) String() string
- type EchoResourceMultipleResponse
- func (*EchoResourceMultipleResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EchoResourceMultipleResponse) GetMessage() string
- func (*EchoResourceMultipleResponse) ProtoMessage()
- func (x *EchoResourceMultipleResponse) ProtoReflect() protoreflect.Message
- func (x *EchoResourceMultipleResponse) Reset()
- func (x *EchoResourceMultipleResponse) String() string
- type EchoResourceRequest
- func (*EchoResourceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EchoResourceRequest) GetMessage() string
- func (x *EchoResourceRequest) GetName() string
- func (*EchoResourceRequest) ProtoMessage()
- func (x *EchoResourceRequest) ProtoReflect() protoreflect.Message
- func (x *EchoResourceRequest) Reset()
- func (x *EchoResourceRequest) String() string
- type EchoResourceResponse
- func (*EchoResourceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EchoResourceResponse) GetMessage() string
- func (*EchoResourceResponse) ProtoMessage()
- func (x *EchoResourceResponse) ProtoReflect() protoreflect.Message
- func (x *EchoResourceResponse) Reset()
- func (x *EchoResourceResponse) String() string
- type EchoResourceServiceClient
- type EchoResourceServiceServer
- type EchoResourceService_EchoResourceBiDiClient
- type EchoResourceService_EchoResourceBiDiServer
- type EchoResourceService_EchoResourceMultipleClient
- type EchoResourceService_EchoResourceMultipleServer
- type UnimplementedEchoResourceServiceServer
- func (UnimplementedEchoResourceServiceServer) EchoResource(context.Context, *EchoResourceRequest) (*EchoResourceResponse, error)
- func (UnimplementedEchoResourceServiceServer) EchoResourceBiDi(EchoResourceService_EchoResourceBiDiServer) error
- func (UnimplementedEchoResourceServiceServer) EchoResourceMultiple(*EchoResourceMultipleRequest, EchoResourceService_EchoResourceMultipleServer) error
- type UnsafeEchoResourceServiceServer
Constants ¶
This section is empty.
Variables ¶
var EchoResourceService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.rpc.examples.echoresource.v1.EchoResourceService", HandlerType: (*EchoResourceServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "EchoResource", Handler: _EchoResourceService_EchoResource_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "EchoResourceMultiple", Handler: _EchoResourceService_EchoResourceMultiple_Handler, ServerStreams: true, }, { StreamName: "EchoResourceBiDi", Handler: _EchoResourceService_EchoResourceBiDi_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/rpc/examples/echoresource/v1/echoresource.proto", }
EchoResourceService_ServiceDesc is the grpc.ServiceDesc for EchoResourceService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_rpc_examples_echoresource_v1_echoresource_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoResourceServiceHandler ¶
func RegisterEchoResourceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterEchoResourceServiceHandler registers the http handlers for service EchoResourceService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEchoResourceServiceHandlerClient ¶
func RegisterEchoResourceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EchoResourceServiceClient) error
RegisterEchoResourceServiceHandlerClient registers the http handlers for service EchoResourceService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EchoResourceServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EchoResourceServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EchoResourceServiceClient" to call the correct interceptors.
func RegisterEchoResourceServiceHandlerFromEndpoint ¶
func RegisterEchoResourceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEchoResourceServiceHandlerFromEndpoint is same as RegisterEchoResourceServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEchoResourceServiceHandlerServer ¶
func RegisterEchoResourceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EchoResourceServiceServer) error
RegisterEchoResourceServiceHandlerServer registers the http handlers for service EchoResourceService to "mux". UnaryRPC :call EchoResourceServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterEchoResourceServiceHandlerFromEndpoint instead.
func RegisterEchoResourceServiceServer ¶
func RegisterEchoResourceServiceServer(s grpc.ServiceRegistrar, srv EchoResourceServiceServer)
Types ¶
type EchoResourceBiDiRequest ¶
type EchoResourceBiDiRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoResourceBiDiRequest) Descriptor
deprecated
func (*EchoResourceBiDiRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoResourceBiDiRequest.ProtoReflect.Descriptor instead.
func (*EchoResourceBiDiRequest) GetMessage ¶
func (x *EchoResourceBiDiRequest) GetMessage() string
func (*EchoResourceBiDiRequest) GetName ¶
func (x *EchoResourceBiDiRequest) GetName() string
func (*EchoResourceBiDiRequest) ProtoMessage ¶
func (*EchoResourceBiDiRequest) ProtoMessage()
func (*EchoResourceBiDiRequest) ProtoReflect ¶
func (x *EchoResourceBiDiRequest) ProtoReflect() protoreflect.Message
func (*EchoResourceBiDiRequest) Reset ¶
func (x *EchoResourceBiDiRequest) Reset()
func (*EchoResourceBiDiRequest) String ¶
func (x *EchoResourceBiDiRequest) String() string
type EchoResourceBiDiResponse ¶
type EchoResourceBiDiResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoResourceBiDiResponse) Descriptor
deprecated
func (*EchoResourceBiDiResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResourceBiDiResponse.ProtoReflect.Descriptor instead.
func (*EchoResourceBiDiResponse) GetMessage ¶
func (x *EchoResourceBiDiResponse) GetMessage() string
func (*EchoResourceBiDiResponse) ProtoMessage ¶
func (*EchoResourceBiDiResponse) ProtoMessage()
func (*EchoResourceBiDiResponse) ProtoReflect ¶
func (x *EchoResourceBiDiResponse) ProtoReflect() protoreflect.Message
func (*EchoResourceBiDiResponse) Reset ¶
func (x *EchoResourceBiDiResponse) Reset()
func (*EchoResourceBiDiResponse) String ¶
func (x *EchoResourceBiDiResponse) String() string
type EchoResourceMultipleRequest ¶
type EchoResourceMultipleRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoResourceMultipleRequest) Descriptor
deprecated
func (*EchoResourceMultipleRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoResourceMultipleRequest.ProtoReflect.Descriptor instead.
func (*EchoResourceMultipleRequest) GetMessage ¶
func (x *EchoResourceMultipleRequest) GetMessage() string
func (*EchoResourceMultipleRequest) GetName ¶
func (x *EchoResourceMultipleRequest) GetName() string
func (*EchoResourceMultipleRequest) ProtoMessage ¶
func (*EchoResourceMultipleRequest) ProtoMessage()
func (*EchoResourceMultipleRequest) ProtoReflect ¶
func (x *EchoResourceMultipleRequest) ProtoReflect() protoreflect.Message
func (*EchoResourceMultipleRequest) Reset ¶
func (x *EchoResourceMultipleRequest) Reset()
func (*EchoResourceMultipleRequest) String ¶
func (x *EchoResourceMultipleRequest) String() string
type EchoResourceMultipleResponse ¶
type EchoResourceMultipleResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoResourceMultipleResponse) Descriptor
deprecated
func (*EchoResourceMultipleResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResourceMultipleResponse.ProtoReflect.Descriptor instead.
func (*EchoResourceMultipleResponse) GetMessage ¶
func (x *EchoResourceMultipleResponse) GetMessage() string
func (*EchoResourceMultipleResponse) ProtoMessage ¶
func (*EchoResourceMultipleResponse) ProtoMessage()
func (*EchoResourceMultipleResponse) ProtoReflect ¶
func (x *EchoResourceMultipleResponse) ProtoReflect() protoreflect.Message
func (*EchoResourceMultipleResponse) Reset ¶
func (x *EchoResourceMultipleResponse) Reset()
func (*EchoResourceMultipleResponse) String ¶
func (x *EchoResourceMultipleResponse) String() string
type EchoResourceRequest ¶
type EchoResourceRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoResourceRequest) Descriptor
deprecated
func (*EchoResourceRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoResourceRequest.ProtoReflect.Descriptor instead.
func (*EchoResourceRequest) GetMessage ¶
func (x *EchoResourceRequest) GetMessage() string
func (*EchoResourceRequest) GetName ¶
func (x *EchoResourceRequest) GetName() string
func (*EchoResourceRequest) ProtoMessage ¶
func (*EchoResourceRequest) ProtoMessage()
func (*EchoResourceRequest) ProtoReflect ¶
func (x *EchoResourceRequest) ProtoReflect() protoreflect.Message
func (*EchoResourceRequest) Reset ¶
func (x *EchoResourceRequest) Reset()
func (*EchoResourceRequest) String ¶
func (x *EchoResourceRequest) String() string
type EchoResourceResponse ¶
type EchoResourceResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoResourceResponse) Descriptor
deprecated
func (*EchoResourceResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResourceResponse.ProtoReflect.Descriptor instead.
func (*EchoResourceResponse) GetMessage ¶
func (x *EchoResourceResponse) GetMessage() string
func (*EchoResourceResponse) ProtoMessage ¶
func (*EchoResourceResponse) ProtoMessage()
func (*EchoResourceResponse) ProtoReflect ¶
func (x *EchoResourceResponse) ProtoReflect() protoreflect.Message
func (*EchoResourceResponse) Reset ¶
func (x *EchoResourceResponse) Reset()
func (*EchoResourceResponse) String ¶
func (x *EchoResourceResponse) String() string
type EchoResourceServiceClient ¶
type EchoResourceServiceClient interface { EchoResource(ctx context.Context, in *EchoResourceRequest, opts ...grpc.CallOption) (*EchoResourceResponse, error) EchoResourceMultiple(ctx context.Context, in *EchoResourceMultipleRequest, opts ...grpc.CallOption) (EchoResourceService_EchoResourceMultipleClient, error) EchoResourceBiDi(ctx context.Context, opts ...grpc.CallOption) (EchoResourceService_EchoResourceBiDiClient, error) }
EchoResourceServiceClient is the client API for EchoResourceService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEchoResourceServiceClient ¶
func NewEchoResourceServiceClient(cc grpc.ClientConnInterface) EchoResourceServiceClient
type EchoResourceServiceServer ¶
type EchoResourceServiceServer interface { EchoResource(context.Context, *EchoResourceRequest) (*EchoResourceResponse, error) EchoResourceMultiple(*EchoResourceMultipleRequest, EchoResourceService_EchoResourceMultipleServer) error EchoResourceBiDi(EchoResourceService_EchoResourceBiDiServer) error // contains filtered or unexported methods }
EchoResourceServiceServer is the server API for EchoResourceService service. All implementations must embed UnimplementedEchoResourceServiceServer for forward compatibility
type EchoResourceService_EchoResourceBiDiClient ¶
type EchoResourceService_EchoResourceBiDiClient interface { Send(*EchoResourceBiDiRequest) error Recv() (*EchoResourceBiDiResponse, error) grpc.ClientStream }
type EchoResourceService_EchoResourceBiDiServer ¶
type EchoResourceService_EchoResourceBiDiServer interface { Send(*EchoResourceBiDiResponse) error Recv() (*EchoResourceBiDiRequest, error) grpc.ServerStream }
type EchoResourceService_EchoResourceMultipleClient ¶
type EchoResourceService_EchoResourceMultipleClient interface { Recv() (*EchoResourceMultipleResponse, error) grpc.ClientStream }
type EchoResourceService_EchoResourceMultipleServer ¶
type EchoResourceService_EchoResourceMultipleServer interface { Send(*EchoResourceMultipleResponse) error grpc.ServerStream }
type UnimplementedEchoResourceServiceServer ¶
type UnimplementedEchoResourceServiceServer struct { }
UnimplementedEchoResourceServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEchoResourceServiceServer) EchoResource ¶
func (UnimplementedEchoResourceServiceServer) EchoResource(context.Context, *EchoResourceRequest) (*EchoResourceResponse, error)
func (UnimplementedEchoResourceServiceServer) EchoResourceBiDi ¶
func (UnimplementedEchoResourceServiceServer) EchoResourceBiDi(EchoResourceService_EchoResourceBiDiServer) error
func (UnimplementedEchoResourceServiceServer) EchoResourceMultiple ¶
func (UnimplementedEchoResourceServiceServer) EchoResourceMultiple(*EchoResourceMultipleRequest, EchoResourceService_EchoResourceMultipleServer) error
type UnsafeEchoResourceServiceServer ¶
type UnsafeEchoResourceServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEchoResourceServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoResourceServiceServer will result in compilation errors.