middlewares

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAuthHeader     = "Authorization"
	DefaultAuthHeaderType = "Bearer"
)

Variables

This section is empty.

Functions

func DefaultAuthHttpHeaderGetter

func DefaultAuthHttpHeaderGetter(ctx echo.Context) (string, error)

Types

type Auth

type Auth struct {
	middleware.NopMiddleware
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(opts ...AuthOpt) *Auth

func (*Auth) Http

func (a *Auth) Http() echo.MiddlewareFunc

func (*Auth) Stream

func (a *Auth) Stream() grpc.StreamServerInterceptor

func (*Auth) Unary

func (a *Auth) Unary() grpc.UnaryServerInterceptor

type AuthOpt

type AuthOpt func(*AuthOpts)

func AuthWithHttpTokenGetter

func AuthWithHttpTokenGetter(getter HttpTokenGetter) AuthOpt

func AuthWithTokens

func AuthWithTokens(tokens []string) AuthOpt

type AuthOpts

type AuthOpts struct {
	Tokens          []string
	HttpTokenGetter HttpTokenGetter
}

type Gzip

type Gzip struct {
	middleware.NopMiddleware
}

func NewGzip

func NewGzip() *Gzip

func (*Gzip) Http

func (*Gzip) Http() echo.MiddlewareFunc

type HttpTokenGetter

type HttpTokenGetter func(echo.Context) (string, error)

type Logger

type Logger struct {
	middleware.NopMiddleware
}

func NewLogger

func NewLogger() *Logger

func (*Logger) Http

func (*Logger) Http() echo.MiddlewareFunc

Jump to

Keyboard shortcuts

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