Documentation
¶
Index ¶
- Variables
- func ExemptPathUnaryInterceptor(exemptPaths []string, interceptor grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
- func GetGrpcServerOpts(enableTracing bool) []grpc.ServerOption
- func InterceptorLogger(l mclog.MCLogger) logging.Logger
- func SetAuthInterceptor(e *echo.Echo, config auth_echo.AuthInterceptorConfig)
- func SetCors(e *echo.Echo, cors string)
- func SetHttpReqHeader(e *echo.Echo, header map[string]string)
- func SetLimits(e *echo.Echo)
- func SetMethodOverride(e *echo.Echo)
- func SetNoCache(e *echo.Echo)
- func SetOptions(e *echo.Echo, cors string)
- func SetProjectIdInterceptor(e *echo.Echo)
- func SetRateLimiter(e *echo.Echo)
- func SetRequestValidator(e *echo.Echo, openapi *openapi3.T)
- func SetSecureConfig(e *echo.Echo)
- func SetTimeout(e *echo.Echo)
- func SetTraceLogger(e *echo.Echo)
- func SetTracing(e *echo.Echo, serviceName string)
Constants ¶
This section is empty.
Variables ¶
var ( DefaultNoCacheConfig = noCacheConfig{ Skipper: middleware.DefaultSkipper, } )
Functions ¶
func ExemptPathUnaryInterceptor ¶
func ExemptPathUnaryInterceptor(exemptPaths []string, interceptor grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor
func GetGrpcServerOpts ¶
func GetGrpcServerOpts(enableTracing bool) []grpc.ServerOption
func InterceptorLogger ¶
InterceptorLogger logs the traceID and spanID along with whatever message is passed
func SetAuthInterceptor ¶
func SetAuthInterceptor(e *echo.Echo, config auth_echo.AuthInterceptorConfig)
func SetMethodOverride ¶
SetMethodOverride set config that prevents method override in HTTP header.
func SetNoCache ¶
func SetOptions ¶
SetOptions sets all options to echo.Echo defined in this file.
func SetProjectIdInterceptor ¶
func SetRateLimiter ¶
SetRateLimiter sets the rate limiter to the server.
func SetSecureConfig ¶
SetSecureConfig defines some of the secure config related to HTTP headers. Definitions are set based on: https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html
func SetTraceLogger ¶
SetTraceLogger logs trace and span IDs along with Method and URI. This is useful to know the traceID that we would like to check on the Grafana Tempo UI
func SetTracing ¶
SetTracing enables tracing and also starts the trace logger
Types ¶
This section is empty.