middlewares

package
v0.0.0-...-9bd9899 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthStackWithOptUserEnd

func AuthStackWithOptUserEnd() middleware.Stack

AuthStackWithOptUserEnd - Adds userEndID from JWT claim, sets it as required

func AuthStackWithUserEnd

func AuthStackWithUserEnd() middleware.Stack

AuthStackWithUserEnd - Adds userEndID from JWT claim, sets it as required

func CheckPlantArchivedForFeed

func CheckPlantArchivedForFeed(fn httprouter.Handle) httprouter.Handle

func CheckPlantArchivedForFeedEntry

func CheckPlantArchivedForFeedEntry(fn httprouter.Handle) httprouter.Handle

func CheckPlantArchivedForFeedMedia

func CheckPlantArchivedForFeedMedia(fn httprouter.Handle) httprouter.Handle

func CheckPlantArchivedForPlant

func CheckPlantArchivedForPlant(fn httprouter.Handle) httprouter.Handle

func CheckPlantArchivedForTimelapse

func CheckPlantArchivedForTimelapse(fn httprouter.Handle) httprouter.Handle

func CreateUserEndObjects

func CreateUserEndObjects(collection string, factory func() db.UserEndObject) middleware.Middleware

CreateUserEndObjects - creates the UserEnd object associated with the inserted object

func JwtTokenUserEndID

func JwtTokenUserEndID(fn httprouter.Handle) httprouter.Handle

JwtTokenUserEndID - Sets the userEndID from the claim, does nothing if missing

func UpdateUserEndObjects

func UpdateUserEndObjects(collection, field string) middleware.Middleware

UpdateUserEndObjects - sets the UserEnd object to dirty when updated

func UserEndIDRequired

func UserEndIDRequired(fn httprouter.Handle) httprouter.Handle

UserEndIDRequired - Checks if the request has a userEndID

Types

type UserEndIDContextKey

type UserEndIDContextKey struct{}

UserEndIDContextKey - context key which stores the request's userEndID

Jump to

Keyboard shortcuts

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