middlewares

package
v0.0.0-...-7e74fd6 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddlewares

func NewMiddlewares(r *Repository)

Types

type AuthUser

type AuthUser struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

type Repository

type Repository struct {
	App *config.Application
	DB  database.DatabaseRepository
}
var Repo *Repository

func NewRepo

func NewRepo(app *config.Application, db *mongo.Database) *Repository

func (*Repository) HasEmail

func (m *Repository) HasEmail(next http.Handler) http.Handler

func (*Repository) HasUsername

func (m *Repository) HasUsername(next http.Handler) http.Handler

func (*Repository) IsAuth

func (m *Repository) IsAuth(next http.Handler) http.Handler

func (*Repository) IsUser

func (m *Repository) IsUser(next http.Handler) http.Handler

func (*Repository) ValidateAuthUser

func (m *Repository) ValidateAuthUser(next http.Handler) http.Handler

func (*Repository) ValidateUpdatePasswordPayload

func (m *Repository) ValidateUpdatePasswordPayload(next http.Handler) http.Handler

func (*Repository) ValidateUpdateUserPasswordPayload

func (m *Repository) ValidateUpdateUserPasswordPayload(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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