Help us shape the future of Go! Take the 2026 Go Developer Survey

middleware

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: AGPL-3.0 Imports: 23 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogHeaders = false
)

Functions

func CaptureBody

func CaptureBody(c *Context)

func CorsHandler

func CorsHandler() macaron.Handler

func DisableTracing

func DisableTracing(c *Context)

func Logger added in v1.0.0

func Logger() macaron.Handler

func NodeReady

func NodeReady() macaron.Handler

func OrgMiddleware

func OrgMiddleware(multiTenant bool) macaron.Handler

func RequestStats

func RequestStats() macaron.Handler

RequestStats returns a middleware that tracks request metrics.

func RequireOrg

func RequireOrg() macaron.Handler

func Tracer

func Tracer(tracer opentracing.Tracer) macaron.Handler

Tracer returns a middleware that traces requests

Types

type Context

type Context struct {
	*macaron.Context
	OrgId uint32
	Body  io.ReadCloser
}

type LoggingResponseWriter added in v1.0.0

type LoggingResponseWriter struct {
	macaron.ResponseWriter
	// contains filtered or unexported fields
}

func (*LoggingResponseWriter) Write added in v1.0.0

func (rw *LoggingResponseWriter) Write(b []byte) (int, error)

type TracingResponseWriter

type TracingResponseWriter struct {
	macaron.ResponseWriter
	// contains filtered or unexported fields
}

func (*TracingResponseWriter) Write

func (rw *TracingResponseWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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