partial

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// FxGroupRESTClientInterceptors defines group name
	FxGroupRESTClientInterceptors = "restClientInterceptors"
	// FxGroupGRPCUnaryClientInterceptors defines group name
	FxGroupGRPCUnaryClientInterceptors = "grpcUnaryClientInterceptors"
)
View Source
const (
	// FxGroupGRPCServerAPIs defines group name
	FxGroupGRPCServerAPIs = "grpcServerAPIs"
	// FxGroupGRPCGatewayGeneratedHandlers defines group name
	FxGroupGRPCGatewayGeneratedHandlers = "grpcGatewayGeneratedHandlers"
	// FxGroupGRPCGatewayMuxOptions defines group name
	FxGroupGRPCGatewayMuxOptions = "grpcGatewayMuxOptions"
	// FxGroupUnaryServerInterceptors defines group name
	FxGroupUnaryServerInterceptors = "unaryServerInterceptors"
	// FxGroupInternalHTTPHandlers defines group name
	FxGroupInternalHTTPHandlers = "internalHttpHandlers"
	// FxGroupInternalHTTPHandlerFunctions defines group name
	FxGroupInternalHTTPHandlerFunctions = "internalHttpHandlerFunctions"
)

Group order is not guaranteed, if it's important then add them manually

Variables

This section is empty.

Functions

func GRPCClientConnectionBuilder

func GRPCClientConnectionBuilder(deps grpcClientConnectionBuilderDeps) clientInt.GRPCClientConnectionBuilder

GRPCClientConnectionBuilder creates an injectable grpc.ClientConn that can be predefined with Interceptors or/and additional options later

func HTTPClientBuilder

func HTTPClientBuilder(deps httpClientBuilderDeps) clientInt.NewHTTPClientBuilder

HTTPClientBuilder creates an injectable http.Client builder that can be predefined with Interceptors

This function returns a closure that will always create a new builder. That way every usage can add different interceptors without influencing others

func HTTPServerBuilder

func HTTPServerBuilder(deps httpServerDeps) serverInt.GRPCWebServiceBuilder

HTTPServerBuilder true to it's name, it is partially initialized builder.

It uses some default assumptions and configurations, which are mostly good. However, if you need to customize your configuration it's better to build yours from scratch

Types

type HTTPHandlerFuncPatternPair

type HTTPHandlerFuncPatternPair struct {
	Pattern     string
	HandlerFunc http.HandlerFunc
}

HTTPHandlerFuncPatternPair defines patter -> handler func pair

type HTTPHandlerPatternPair

type HTTPHandlerPatternPair struct {
	Pattern string
	Handler http.Handler
}

HTTPHandlerPatternPair defines pattern -> handler pair

Jump to

Keyboard shortcuts

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