middleware

package
v0.0.0-...-ff9d945 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package middleware provides different middlewares than can be used by the http transports

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyMiddleware

func ApplyMiddleware(app core.App)

ApplyMiddleware adds all the generic middleware to our app

Types

type CustomValidator

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

CustomValidator enables us to use the validator package

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

Validate used to validate our HTTP payloads depending on the `validate` struct tags

type EchoWrapper

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

EchoWrapper is a struct for creating the otel middleware

func NewOtel

func NewOtel() *EchoWrapper

NewOtel returns a new EchoWrapper struct

func (*EchoWrapper) Middleware

func (e *EchoWrapper) Middleware() echo.MiddlewareFunc

Middleware returns an echo.MiddlewareFunc to be used with Echo.Use()

Jump to

Keyboard shortcuts

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