requestmeta

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TeamAlerting = "alerting"
	TeamAuth     = "auth"
	TeamCore     = "core"
)

Variables

This section is empty.

Functions

func SetOwner

func SetOwner(team string) web.Handler

SetOwner returns an `web.Handler` that sets the team name for an request.

func SetRequestMetaData

func SetRequestMetaData(rmd RequestMetaData) web.Handler

SetRequestMetaData returns an `web.Handler` that overrides the request metadata with the provided param.

func SetupRequestMetadata

func SetupRequestMetadata() web.Middleware

SetupRequestMetadata injects defaul request metadata values on the request context.

Types

type RequestMetaData

type RequestMetaData struct {
	Team string
}

func GetRequestMetaData

func GetRequestMetaData(ctx context.Context) *RequestMetaData

GetRequestMetaData returns the request metadata for the context. if request metadata is missing it will return the default values.

Jump to

Keyboard shortcuts

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