moulbotpb

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Overview

Package moulbotpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_moulbot_proto protoreflect.FileDescriptor

Functions

func RegisterWebAPIHandler

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

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

func RegisterWebAPIHandlerClient

func RegisterWebAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WebAPIClient) error

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

func RegisterWebAPIHandlerFromEndpoint

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

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

func RegisterWebAPIHandlerServer

func RegisterWebAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WebAPIServer) error

RegisterWebAPIHandlerServer registers the http handlers for service WebAPI to "mux". UnaryRPC :call WebAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterWebAPIServer

func RegisterWebAPIServer(s *grpc.Server, srv WebAPIServer)

Types

type Ping

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

func (*Ping) Descriptor deprecated

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

Deprecated: Use Ping.ProtoReflect.Descriptor instead.

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) ProtoReflect

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

func (*Ping) Reset

func (x *Ping) Reset()

func (*Ping) String

func (x *Ping) String() string

type Ping_Request

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

func (*Ping_Request) Descriptor deprecated

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

Deprecated: Use Ping_Request.ProtoReflect.Descriptor instead.

func (*Ping_Request) ProtoMessage

func (*Ping_Request) ProtoMessage()

func (*Ping_Request) ProtoReflect

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

func (*Ping_Request) Reset

func (x *Ping_Request) Reset()

func (*Ping_Request) String

func (x *Ping_Request) String() string

type Ping_Response

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

func (*Ping_Response) Descriptor deprecated

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

Deprecated: Use Ping_Response.ProtoReflect.Descriptor instead.

func (*Ping_Response) ProtoMessage

func (*Ping_Response) ProtoMessage()

func (*Ping_Response) ProtoReflect

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

func (*Ping_Response) Reset

func (x *Ping_Response) Reset()

func (*Ping_Response) String

func (x *Ping_Response) String() string

type UnimplementedWebAPIServer

type UnimplementedWebAPIServer struct {
}

UnimplementedWebAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedWebAPIServer) Ping

type WebAPIClient

type WebAPIClient interface {
	Ping(ctx context.Context, in *Ping_Request, opts ...grpc.CallOption) (*Ping_Response, error)
}

WebAPIClient is the client API for WebAPI 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 NewWebAPIClient

func NewWebAPIClient(cc grpc.ClientConnInterface) WebAPIClient

type WebAPIServer

type WebAPIServer interface {
	Ping(context.Context, *Ping_Request) (*Ping_Response, error)
}

WebAPIServer is the server API for WebAPI service.

Jump to

Keyboard shortcuts

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