users

package
v0.0.0-...-47d141a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleLoginUser

func HandleLoginUser(w http.ResponseWriter, req *http.Request)

@title Login a user @version 1 @description Login a user with email and password given in the body @Tags authentication @accept json @produce json @success 200 {object} utils.DBUserResponse @failure 400 {object} string @failure 500 {object} string @router /auth/login [post]

func HandleRegisterUser

func HandleRegisterUser(w http.ResponseWriter, req *http.Request)

@title Register a user @version 1 @description Register a user with fist name, last name, email, password and bio given in the body @Tags authentication @accept json @param data body database.User true "User details" @produce json @success 201 {object} utils.DbUserFullSchema @failure 400 {object} string @failure 500 {object} string @router /auth/register [post]

func HandleUserLogout

func HandleUserLogout(w http.ResponseWriter, _ *http.Request, user database.User)

@title Logout a user @version 1 @description Logout a user @Tags authentication @accept json @produce json @success 202 {object} utils.DBUserResponse @failure 400 {object} string @failure 500 {object} string @router /auth/logout [post]

Types

This section is empty.

Jump to

Keyboard shortcuts

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