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
- func GetOdataFromContext(ctx context.Context) *odata.QueryOptions
- type OdataMiddleware
- func (o *OdataMiddleware) DisableCountSupport()
- func (o *OdataMiddleware) DisableFilterSupport()
- func (o *OdataMiddleware) DisableOrderBySupport()
- func (o *OdataMiddleware) DisableSelectSupport()
- func (o *OdataMiddleware) DisableSkipSupport()
- func (o *OdataMiddleware) DisableTopSupport()
- func (o *OdataMiddleware) EnableCountSupport()
- func (o *OdataMiddleware) EnableFilterSupport()
- func (o *OdataMiddleware) EnableOrderBySupport()
- func (o *OdataMiddleware) EnableSelectSupport()
- func (o *OdataMiddleware) EnableSkipSupport()
- func (o *OdataMiddleware) EnableTopSupport()
- func (o *OdataMiddleware) GinMiddleware(c *gin.Context)
- func (o *OdataMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)
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)
Click to show internal directories.
Click to hide internal directories.