middleware

package
v0.0.0-...-ecb1187 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Keys map[string]string

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	Logger *logrus.Logger
}

func NewMiddleware

func NewMiddleware(logger *logrus.Logger) *Middleware

func (*Middleware) CORSMiddleware

func (m *Middleware) CORSMiddleware(next http.Handler) http.Handler

func (*Middleware) LoggingMiddleware

func (m *Middleware) LoggingMiddleware(next http.Handler) http.Handler

func (*Middleware) RecoverMiddleware

func (m *Middleware) RecoverMiddleware(next http.Handler) http.Handler

func (*Middleware) SignMiddleware

func (m *Middleware) SignMiddleware(next http.Handler) http.Handler

type Signature

type Signature struct {
	AppKey   string `json:"appkey"`
	CurTime  string `json:"curtime"`
	Nonce    string `json:"nonce"`
	CheckSum string `json:"checksum"`
}

func GenerateSignature

func GenerateSignature(key string, secret string) *Signature

func (*Signature) CheckSignature

func (sign *Signature) CheckSignature() error

Jump to

Keyboard shortcuts

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