interceptor

package
v0.0.0-...-da226d4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServerMiddleware

func ServerMiddleware(dbClientProvider DBClientProvider, option ...db.Option) func(next http.Handler) http.Handler

ServerMiddleware wrap endpoint with middleware mixing in db connection

func StreamServerInterceptor

func StreamServerInterceptor(dbClientProvider DBClientProvider, option ...db.Option) grpc.StreamServerInterceptor

UnaryServerInterceptor wrap endpoint with middleware mixing in db connection

func UnaryServerInterceptor

func UnaryServerInterceptor(dbClientProvider DBClientProvider, option ...db.Option) grpc.UnaryServerInterceptor

UnaryServerInterceptor wrap endpoint with middleware mixing in db connection

Types

type DBClientProvider

type DBClientProvider func(ctx context.Context) db.IClient

DBClientProvider is a func for wrapping database

Jump to

Keyboard shortcuts

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