v1

package
v0.1.82 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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 (*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 (*EchoResourceMultipleResponse) Reset

func (x *EchoResourceMultipleResponse) Reset()

func (*EchoResourceMultipleResponse) 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.

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) EchoResourceBiDi

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.

Jump to

Keyboard shortcuts

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