middleware

package
v0.0.0-...-727adce Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package middleware provides an HTTP middleware for parsing OData query options from the URL and adding them to the request context.

Index

Constants

View Source
const (
	ContextKey contextKeyType = "odata"
)

Variables

This section is empty.

Functions

func GetOdataFromContext

func GetOdataFromContext(ctx context.Context) *odata.QueryOptions

Types

type OdataMiddleware

type OdataMiddleware struct {
	// contains filtered or unexported fields
}

func NewOdataMiddleware

func NewOdataMiddleware(handlerToWrap http.Handler) *OdataMiddleware

func (*OdataMiddleware) DisableCountSupport

func (o *OdataMiddleware) DisableCountSupport()

func (*OdataMiddleware) DisableFilterSupport

func (o *OdataMiddleware) DisableFilterSupport()

func (*OdataMiddleware) DisableOrderBySupport

func (o *OdataMiddleware) DisableOrderBySupport()

func (*OdataMiddleware) DisableSelectSupport

func (o *OdataMiddleware) DisableSelectSupport()

func (*OdataMiddleware) DisableSkipSupport

func (o *OdataMiddleware) DisableSkipSupport()

func (*OdataMiddleware) DisableTopSupport

func (o *OdataMiddleware) DisableTopSupport()

func (*OdataMiddleware) EnableCountSupport

func (o *OdataMiddleware) EnableCountSupport()

func (*OdataMiddleware) EnableFilterSupport

func (o *OdataMiddleware) EnableFilterSupport()

func (*OdataMiddleware) EnableOrderBySupport

func (o *OdataMiddleware) EnableOrderBySupport()

func (*OdataMiddleware) EnableSelectSupport

func (o *OdataMiddleware) EnableSelectSupport()

func (*OdataMiddleware) EnableSkipSupport

func (o *OdataMiddleware) EnableSkipSupport()

func (*OdataMiddleware) EnableTopSupport

func (o *OdataMiddleware) EnableTopSupport()

func (*OdataMiddleware) GinMiddleware

func (o *OdataMiddleware) GinMiddleware(c *gin.Context)

func (*OdataMiddleware) ServeHTTP

func (o *OdataMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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