Documentation
¶
Index ¶
- Constants
- func Auth(authService services.AuthService) func(http.Handler) http.Handler
- func GetFlashFromContext(r *http.Request) *services.FlashMessage
- func GetOwnerID(ctx context.Context) (int64, bool)
- func GetUserFromContext(r *http.Request) *models.User
- func InjectFlash(flashService services.FlashService) func(http.Handler) http.Handler
- func InjectUser(authService services.AuthService) func(http.Handler) http.Handler
- func OwnerResolver(usersRepo repositories.UsersRepository, ...) func(http.Handler) http.Handler
- func StaticFileServer(fileServer http.Handler) func(http.Handler) http.Handler
- type OwnerType
Constants ¶
View Source
const ( ContextKeyUser contextKey = "user" ContextKeyFlash contextKey = "flash" )
View Source
const ( OwnerTypeKey contextKey = "ownerType" OwnerIDKey contextKey = "ownerID" )
Variables ¶
This section is empty.
Functions ¶
func GetFlashFromContext ¶
func GetFlashFromContext(r *http.Request) *services.FlashMessage
func InjectFlash ¶
func InjectUser ¶
func OwnerResolver ¶
func OwnerResolver(usersRepo repositories.UsersRepository, orgsRepo repositories.OrganizationsRepository) func(http.Handler) http.Handler
Types ¶
Click to show internal directories.
Click to hide internal directories.