middleware

package
v0.0.0-...-4d78421 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKeyUserID contextKey = "userID"
	ContextKeyOrgID  contextKey = "orgID"
	ContextKeyBuID   contextKey = "buID"
)
View Source
const IdempotencyKeyTTLDays = 7

Variables

View Source
var (
	ExcludedMethods   = getExcludedMethods()
	ExcludedPaths     = getExcludedPaths()
	IdempotencyKeyTTL = getIdempotencyKeyTTL()
)

Functions

func BasicLoggingMiddleware

func BasicLoggingMiddleware(next http.Handler) http.Handler

func IdempotencyMiddleware

func IdempotencyMiddleware(next http.Handler) http.Handler

func SessionMiddleware

func SessionMiddleware(next http.Handler) http.Handler

Types

type StoredResponse

type StoredResponse struct {
	StatusCode int                 `json:"statusCode"`
	Headers    map[string][]string `json:"headers"`
	Body       []byte              `json:"body"`
}

StoredResponse represents the structure to store response data.

Jump to

Keyboard shortcuts

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