echo

package module
v0.0.0-...-159dada Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(e *echo.Echo, basePath string, handlers *gotrust.GenericAuthHandlers)

RegisterRoutes registers all auth routes on an Echo instance

func WrapHandler

func WrapHandler(handler gotrust.HTTPHandler) echo.HandlerFunc

WrapHandler converts a gotrust.HTTPHandler to echo.HandlerFunc

func WrapMiddleware

func WrapMiddleware(middleware gotrust.HTTPMiddleware) echo.MiddlewareFunc

WrapMiddleware converts a gotrust.HTTPMiddleware to echo.MiddlewareFunc

Types

type EchoContext

type EchoContext struct {
	echo.Context
}

EchoContext wraps echo.Context to implement gotrust.HTTPContext

func (*EchoContext) Context

func (e *EchoContext) Context() context.Context

Context returns the request context

func (*EchoContext) GetCookie

func (e *EchoContext) GetCookie(name string) (*http.Cookie, error)

GetCookie gets a cookie

func (*EchoContext) GetFormValue

func (e *EchoContext) GetFormValue(key string) string

GetFormValue gets a form value

func (*EchoContext) GetHeader

func (e *EchoContext) GetHeader(key string) string

GetHeader gets a request header

func (*EchoContext) GetQueryParam

func (e *EchoContext) GetQueryParam(key string) string

GetQueryParam gets a query parameter

func (*EchoContext) SetCookie

func (e *EchoContext) SetCookie(cookie *http.Cookie)

SetCookie sets a cookie

func (*EchoContext) SetHeader

func (e *EchoContext) SetHeader(key, value string)

SetHeader sets a response header

func (*EchoContext) SetStatus

func (e *EchoContext) SetStatus(code int)

SetStatus sets the response status code

type EchoRouter

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

EchoRouter wraps echo.Group to implement gotrust.Router

func NewEchoRouter

func NewEchoRouter(group *echo.Group) *EchoRouter

NewEchoRouter creates a new Echo router wrapper

func (*EchoRouter) DELETE

func (r *EchoRouter) DELETE(path string, handler gotrust.HTTPHandler, middleware ...gotrust.HTTPMiddleware)

DELETE registers a DELETE route

func (*EchoRouter) GET

func (r *EchoRouter) GET(path string, handler gotrust.HTTPHandler, middleware ...gotrust.HTTPMiddleware)

GET registers a GET route

func (*EchoRouter) Group

func (r *EchoRouter) Group(prefix string, middleware ...gotrust.HTTPMiddleware) gotrust.Router

Group creates a new route group

func (*EchoRouter) POST

func (r *EchoRouter) POST(path string, handler gotrust.HTTPHandler, middleware ...gotrust.HTTPMiddleware)

POST registers a POST route

func (*EchoRouter) PUT

func (r *EchoRouter) PUT(path string, handler gotrust.HTTPHandler, middleware ...gotrust.HTTPMiddleware)

PUT registers a PUT route

Jump to

Keyboard shortcuts

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