errcodepb

package
v0.2.10-102 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package errcodepb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ErrorService_Codes_FullMethodName = "/lava.service.ErrorService/Codes"
)

Variables

View Source
var ErrorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "lava.service.ErrorService",
	HandlerType: (*ErrorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Codes",
			Handler:    _ErrorService_Codes_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/services/errcode/api.proto",
}

ErrorService_ServiceDesc is the grpc.ServiceDesc for ErrorService 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_services_errcode_api_proto protoreflect.FileDescriptor

Functions

func RegisterErrorServiceHandler

func RegisterErrorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterErrorServiceHandler registers the http handlers for service ErrorService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterErrorServiceHandlerClient

func RegisterErrorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ErrorServiceClient) error

RegisterErrorServiceHandlerClient registers the http handlers for service ErrorService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ErrorServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ErrorServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ErrorServiceClient" to call the correct interceptors.

func RegisterErrorServiceHandlerFromEndpoint

func RegisterErrorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterErrorServiceHandlerFromEndpoint is same as RegisterErrorServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterErrorServiceHandlerServer

func RegisterErrorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ErrorServiceServer) error

RegisterErrorServiceHandlerServer registers the http handlers for service ErrorService to "mux". UnaryRPC :call ErrorServiceServer 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 RegisterErrorServiceHandlerFromEndpoint instead.

func RegisterErrorServiceServer

func RegisterErrorServiceServer(s grpc.ServiceRegistrar, srv ErrorServiceServer)

Types

type ErrCodes

type ErrCodes struct {
	Codes []*errorpb.ErrCode `protobuf:"bytes,1,rep,name=codes,proto3" json:"codes,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrCodes) Descriptor deprecated

func (*ErrCodes) Descriptor() ([]byte, []int)

Deprecated: Use ErrCodes.ProtoReflect.Descriptor instead.

func (*ErrCodes) GetCodes

func (x *ErrCodes) GetCodes() []*errorpb.ErrCode

func (*ErrCodes) ProtoMessage

func (*ErrCodes) ProtoMessage()

func (*ErrCodes) ProtoReflect

func (x *ErrCodes) ProtoReflect() protoreflect.Message

func (*ErrCodes) Reset

func (x *ErrCodes) Reset()

func (*ErrCodes) String

func (x *ErrCodes) String() string

type ErrorServiceClient

type ErrorServiceClient interface {
	Codes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ErrCodes, error)
}

ErrorServiceClient is the client API for ErrorService 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 ErrorServiceServer

type ErrorServiceServer interface {
	Codes(context.Context, *emptypb.Empty) (*ErrCodes, error)
}

ErrorServiceServer is the server API for ErrorService service. All implementations should embed UnimplementedErrorServiceServer for forward compatibility

type UnimplementedErrorServiceServer

type UnimplementedErrorServiceServer struct {
}

UnimplementedErrorServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedErrorServiceServer) Codes

type UnsafeErrorServiceServer

type UnsafeErrorServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeErrorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ErrorServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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