gen

package
v0.0.0-...-14d2bb4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package gen is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFileUploadHandler

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

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

func RegisterFileUploadHandlerClient

func RegisterFileUploadHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extGen.FileUploadClient) error

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

func RegisterFileUploadHandlerFromEndpoint

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

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

func RegisterFileUploadHandlerServer

func RegisterFileUploadHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extGen.FileUploadServer) error

RegisterFileUploadHandlerServer registers the http handlers for service FileUpload to "mux". UnaryRPC :call FileUploadServer 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 RegisterFileUploadHandlerFromEndpoint instead.

func RegisterShrlsHandler

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

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

func RegisterShrlsHandlerClient

func RegisterShrlsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extGen.ShrlsClient) error

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

func RegisterShrlsHandlerFromEndpoint

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

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

func RegisterShrlsHandlerServer

func RegisterShrlsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extGen.ShrlsServer) error

RegisterShrlsHandlerServer registers the http handlers for service Shrls to "mux". UnaryRPC :call ShrlsServer 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 RegisterShrlsHandlerFromEndpoint instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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