mid

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiKeyAuthMiddleware

func ApiKeyAuthMiddleware(pathPrefix string, apiKey string) gin.HandlerFunc

func CorsMiddleware

func CorsMiddleware() gin.HandlerFunc

func MetricsMiddleware

func MetricsMiddleware(metricsURL string, engine *gin.Engine) gin.HandlerFunc

func RequestLogsForClients

func RequestLogsForClients() func(rq *http.Request, rqBody []byte, rs *http.Response, rsBody []byte, err error, start time.Time)

func RequestLogsMiddleware

func RequestLogsMiddleware(logRequests bool) gin.HandlerFunc

Types

type Health

type Health struct {
	AlexaClient client.IAlexaClient
}

func NewHealth

func NewHealth(alexaClient client.IAlexaClient) *Health

func (*Health) GetHealth

func (api *Health) GetHealth(context *gin.Context)

type HealthResponse

type HealthResponse struct {
	StatusCode int
	Body       gin.H
	UpdatedAt  time.Time
}

type ResponseBodyWriter

type ResponseBodyWriter struct {
	gin.ResponseWriter
	// contains filtered or unexported fields
}

func (ResponseBodyWriter) Write

func (w ResponseBodyWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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