context

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientKey  ctxKey = "client"
	PatientKey ctxKey = "patient"
	UserKey    ctxKey = "user"
)

enumerates all context keys

Variables

This section is empty.

Functions

func AuthCtx

func AuthCtx(userService service.UserService) func(http.Handler) http.Handler

AuthCtx middleware is used to load a User object from the authentication headers passed through as the request. In case the User could not be found, we stop here and return a 500.

func ClientCtx

func ClientCtx(clientService service.ClientService) func(http.Handler) http.Handler

ClientCtx middleware is used to load a Client object from the authenticated user

func PatientCtx

func PatientCtx(patientService service.PatientService) func(http.Handler) http.Handler

PatientCtx middleware is used to load a RoomAssignment object from the URL parameters passed through as the request. In case the RoomAssignment could not be found, we stop here and return a 404.

Types

This section is empty.

Jump to

Keyboard shortcuts

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