auth

package
v0.0.0-...-e6240ef Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController() *Controller

func (*Controller) Login

func (c *Controller) Login(w http.ResponseWriter, r *http.Request)

Login user login @Summary User login @Description User login endpoint. Returns JWT token. Use returned access token in Authorization header as Bearer token @Tags auth @Accept json @Produce json @Param body body request.LoginRequest true "login details" @Success 200 {object} response.LoginResponse "auth token" @Failure 400 {object} response.Error @Router /v1/auth/login [post]

func (*Controller) SignUp

func (c *Controller) SignUp(w http.ResponseWriter, r *http.Request)

SignUp user signUp @Summary User SignUp @Description User SignUp endpoint. @Tags auth @Accept json @Produce json @Param body body request.SignUpRequest true "user create" @Success 201 @Failure 400 {object} response.Error @Router /v1/auth/sign-up [post]

Jump to

Keyboard shortcuts

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