controllers

package
v0.0.0-...-6b47afd Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTrailingSlash

func AddTrailingSlash(next http.Handler) http.Handler

func CreateUser

func CreateUser(w http.ResponseWriter, r *http.Request)

func GetAllUsers

func GetAllUsers(w http.ResponseWriter, r *http.Request)

func GetImage

func GetImage(w http.ResponseWriter, r *http.Request)

func GetUserByID

func GetUserByID(w http.ResponseWriter, r *http.Request)

func MethodNotAllowed

func MethodNotAllowed(w http.ResponseWriter, r *http.Request)

func NotFound

func NotFound(w http.ResponseWriter, r *http.Request)

func Recovery

func Recovery(next http.Handler) http.Handler

TODO : Add proper error logging when these critical mistakes occurr

Types

type UserJSON

type UserJSON struct {
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Email     string `json:"email"`
	Password  string `json:"password"`
}

func (*UserJSON) Decode

func (uj *UserJSON) Decode(requestBody io.ReadCloser) error

Jump to

Keyboard shortcuts

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