util

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const PEM_BEGIN = "-----BEGIN PUBLIC KEY-----"
View Source
const PEM_END = "-----END PUBLIC KEY-----"

Variables

This section is empty.

Functions

This section is empty.

Types

type CorsMiddleware

type CorsMiddleware struct {
	// contains filtered or unexported fields
}

func NewCors

func NewCors(handler http.Handler) *CorsMiddleware

func (*CorsMiddleware) ServeHTTP

func (this *CorsMiddleware) ServeHTTP(res http.ResponseWriter, req *http.Request)

type Jwt

type Jwt interface {
	ParseRequest(request *http.Request) (user string, err error)
}

func NewJwt

func NewJwt(config configuration.Config) Jwt

type JwtImpl

type JwtImpl struct {
	// contains filtered or unexported fields
}

func (JwtImpl) Parse

func (this JwtImpl) Parse(token string) (user string, err error)

func (JwtImpl) ParseRequest

func (this JwtImpl) ParseRequest(request *http.Request) (user string, err error)

type LoggerMiddleWare

type LoggerMiddleWare struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(handler http.Handler) *LoggerMiddleWare

func (*LoggerMiddleWare) ServeHTTP

func (this *LoggerMiddleWare) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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