v1

package
v0.0.0-...-b497eb9 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() http.Handler

New returns the API V1 Handler with configuration.

Types

type UserRouter

type UserRouter struct {
	Repository user.Repository
}

UserRouter is the router of the users.

func (*UserRouter) CreateHandler

func (ur *UserRouter) CreateHandler(w http.ResponseWriter, r *http.Request)

CreateHandler Create a new user.

func (*UserRouter) DeleteHandler

func (ur *UserRouter) DeleteHandler(w http.ResponseWriter, r *http.Request)

DeleteHandler Remove a user by ID.

func (*UserRouter) GetOneHandler

func (ur *UserRouter) GetOneHandler(w http.ResponseWriter, r *http.Request)

GetOneHandler response one user by username.

func (*UserRouter) LoginHandler

func (ur *UserRouter) LoginHandler(w http.ResponseWriter, r *http.Request)

LoginHandler search user and return a jwt.

func (*UserRouter) Routes

func (ur *UserRouter) Routes() http.Handler

Routes returns user router with each endpoint.

func (*UserRouter) UpdateHandler

func (ur *UserRouter) UpdateHandler(w http.ResponseWriter, r *http.Request)

UpdateHandler update a stored user by id.

Jump to

Keyboard shortcuts

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