middlewares

package
v0.0.0-...-1b1fb7f Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(next http.Handler) func(http.ResponseWriter, *http.Request)

Authenticate ...

Types

type Validator

type Validator struct {
	Message     string
	Errors      map[string]string
	UserService *db.UserService
}

Validator ...

func NewValidator

func NewValidator(c *mongo.Client, config *root.MongoConfig) *Validator

NewValidator ...

func (*Validator) ValidateUserExist

func (v *Validator) ValidateUserExist(next http.Handler) func(http.ResponseWriter, *http.Request)

ValidateUserExist ...

func (*Validator) ValidateUserLogin

func (v *Validator) ValidateUserLogin(next http.Handler) func(http.ResponseWriter, *http.Request)

ValidateUserLogin ...

func (*Validator) ValidateUserRegister

func (v *Validator) ValidateUserRegister(next http.Handler) func(http.ResponseWriter, *http.Request)

ValidateUserRegister ...

Jump to

Keyboard shortcuts

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