routes

package
v0.0.0-...-f464bf3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReqCtxMiddleware

func NewReqCtxMiddleware(logger *logrus.FieldLogger) func(fn Handler) httprouter.Handle

WithReqCtx parses the request and adds a reqcontext.RequestContext instance related to the request.

Types

type Handler

Handler is the signature for functions that accepts a reqcontext.RequestContext in addition to those required by the httprouter package.

type Middleware

type Middleware func(Handler) Handler

func NewTokenAuthMiddleware

func NewTokenAuthMiddleware(authService services.AuthService) Middleware

wrap parses the request and adds a reqcontext.RequestContext instance related to the request.

type Route

type Route struct {
	Name         string
	Method       string
	Path         string
	AuthRequired bool
	HandlerFunc  Handler
}

A Route defines the parameters for an api endpoint

type Routes

type Routes []Route

Routes are a collection of defined api endpoints

Jump to

Keyboard shortcuts

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