middlewares

package
v0.0.0-...-a170de9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EN english language
	EN = "en"

	// TH thai language
	TH = "th"
)

Variables

This section is empty.

Functions

func AcceptLanguage

func AcceptLanguage(next http.Handler) http.Handler

AcceptLanguage header Accept-Language

func GetIPAddress

func GetIPAddress(r *http.Request) string

GetIPAddress get ip address from request

func IPFromRequest

func IPFromRequest(req *http.Request) (net.IP, error)

IPFromRequest get ip address

func Request

func Request(next http.Handler) http.Handler

Request request from client handle log

func RequireAuthentication

func RequireAuthentication(next http.Handler) http.Handler

RequireAuthentication require authentication

func Transaction

func Transaction(next http.Handler) http.Handler

Transaction to do transaction my sql

Types

This section is empty.

Jump to

Keyboard shortcuts

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