blue

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package blue is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var Blue_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "blueapi.blue.v1.Blue",
	HandlerType: (*BlueServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Me",
			Handler:    _Blue_Me_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "blue/v1/blue.proto",
}

Blue_ServiceDesc is the grpc.ServiceDesc for Blue 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_blue_v1_blue_proto protoreflect.FileDescriptor

Functions

func RegisterBlueHandler

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

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

func RegisterBlueHandlerClient

func RegisterBlueHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlueClient) error

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

func RegisterBlueHandlerFromEndpoint

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

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

func RegisterBlueHandlerServer

func RegisterBlueHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlueServer) error

RegisterBlueHandlerServer registers the http handlers for service Blue to "mux". UnaryRPC :call BlueServer 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 RegisterBlueHandlerFromEndpoint instead.

func RegisterBlueServer

func RegisterBlueServer(s grpc.ServiceRegistrar, srv BlueServer)

Types

type BlueClient

type BlueClient interface {
	Me(ctx context.Context, in *MeRequest, opts ...grpc.CallOption) (*MeResponse, error)
}

BlueClient is the client API for Blue 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 NewBlueClient

func NewBlueClient(cc grpc.ClientConnInterface) BlueClient

type BlueServer

type BlueServer interface {
	Me(context.Context, *MeRequest) (*MeResponse, error)
	// contains filtered or unexported methods
}

BlueServer is the server API for Blue service. All implementations must embed UnimplementedBlueServer for forward compatibility

type MeRequest

type MeRequest struct {
	// contains filtered or unexported fields
}

Request message for Blue.Me.

func (*MeRequest) Descriptor deprecated

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

Deprecated: Use MeRequest.ProtoReflect.Descriptor instead.

func (*MeRequest) ProtoMessage

func (*MeRequest) ProtoMessage()

func (*MeRequest) ProtoReflect

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

func (*MeRequest) Reset

func (x *MeRequest) Reset()

func (*MeRequest) String

func (x *MeRequest) String() string

type MeResponse

type MeResponse struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Response message for Blue.Me.

func (*MeResponse) Descriptor deprecated

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

Deprecated: Use MeResponse.ProtoReflect.Descriptor instead.

func (*MeResponse) GetName

func (x *MeResponse) GetName() string

func (*MeResponse) ProtoMessage

func (*MeResponse) ProtoMessage()

func (*MeResponse) ProtoReflect

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

func (*MeResponse) Reset

func (x *MeResponse) Reset()

func (*MeResponse) String

func (x *MeResponse) String() string

type UnimplementedBlueServer

type UnimplementedBlueServer struct {
}

UnimplementedBlueServer must be embedded to have forward compatible implementations.

func (UnimplementedBlueServer) Me

type UnsafeBlueServer

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

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

Jump to

Keyboard shortcuts

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