handlers

package
v0.0.0-...-f3df126 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrUnauthorized

func ErrUnauthorized(w http.ResponseWriter, err error)

ErrUnauthorized is a helper for consistent unauthorized responses

Types

type UserHandler

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

func NewUserHandler

func NewUserHandler(repo repository.UserRepository, l *zerolog.Logger) *UserHandler

func (*UserHandler) GetUser

func (h *UserHandler) GetUser(w http.ResponseWriter, r *http.Request)

func (*UserHandler) Login

func (h *UserHandler) Login(w http.ResponseWriter, r *http.Request)

func (*UserHandler) MiddlewareAuth

func (h *UserHandler) MiddlewareAuth(next http.Handler) http.Handler

func (*UserHandler) Signup

func (h *UserHandler) Signup(w http.ResponseWriter, r *http.Request)

func (*UserHandler) UpdatePassword

func (h *UserHandler) UpdatePassword(w http.ResponseWriter, r *http.Request)

func (*UserHandler) UpdateUser

func (h *UserHandler) UpdateUser(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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