middleware

package
v0.0.0-...-691959d Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuthentication

func CheckAuthentication(next http.HandlerFunc) http.HandlerFunc

CheckAuthentication check the auhtorisation

func ContentTypeJSON

func ContentTypeJSON(next http.HandlerFunc) http.HandlerFunc

ContentTypeJSON set the content type to JSON

Types

type Key

type Key int

Key is a named type for keys

const (
	// KeyToken is used to store token in context
	KeyToken Key = iota

	// KeyUserID is used to store user ID in context
	KeyUserID Key = iota
)

Jump to

Keyboard shortcuts

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