servicecontext

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ARMRequestCtx

func ARMRequestCtx(pathBase, location string) func(h http.Handler) http.Handler

ARMRequestCtx is a middleware handler that adds an ARM request context to an incoming request. It takes in a pathBase and location string and returns a function that takes in an http.Handler. If the location string is empty, it will panic. Otherwise, it will attempt to create an ARM request context from the request and location strings. If it fails, it will return a bad request response. If successful, it will add the ARM request context to the request and pass it to the http.Handler.

func WithOperationType

func WithOperationType(operationType v1.OperationType) func(h http.Handler) http.Handler

WithOperationType is the middleware to inject operation type to the http request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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