middleware

package
v0.0.0-...-cf93416 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthHeader = http.CanonicalHeaderKey("X-Auth-Header")

AuthHeader is header for auth process.

View Source
var SessionHeader = http.CanonicalHeaderKey("X-Session-Key")

SessionHeader is header for session key.

Functions

func GetID

func GetID(request *http.Request) string

GetID get ID from request context, which was sets in IDContext middleware.

func GetSearchIndex

func GetSearchIndex(request *http.Request) string

GetSearchIndex get search type string from request context, which was sets in SearchIndexContext middleware.

func GetSearchQuery

func GetSearchQuery(request *http.Request) string

GetSearchQuery get search parameter string from request context, which was sets in SearchQueryContext middleware.

func HasAccessToKeys

func HasAccessToKeys(next http.Handler) http.Handler

HasAccessToKeys check client on aceess to keys endpoint.

func HasAccessToModules

func HasAccessToModules(next http.Handler) http.Handler

HasAccessToModules check client on aceess to users endpoint.

func HasAccessToUsers

func HasAccessToUsers(next http.Handler) http.Handler

HasAccessToUsers check client on aceess to users endpoint.

func IDContext

func IDContext(next http.Handler) http.Handler

IDContext set the id context value.

func IsAuth

func IsAuth(next http.Handler) http.Handler

IsAuth check for user has session for access to api.

func SearchIndexContext

func SearchIndexContext(next http.Handler) http.Handler

SearchIndexContext set the searchIndex context value.

func SearchQueryContext

func SearchQueryContext(next http.Handler) http.Handler

SearchQueryContext set the searchQuery context value.

Types

type ContextKey

type ContextKey string

ContextKey is base key type.

func (ContextKey) String

func (key ContextKey) String() string

Jump to

Keyboard shortcuts

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