controllers

package
v0.0.0-...-0b7230a Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserController

type UserController struct {
	Service services.UserService
}

UserController -> the propose of user controller is handling request from client and forward it to specific service

func UController

func UController() UserController

UController -> user controller instance

func (*UserController) CreateUser

func (u *UserController) CreateUser(c *gin.Context)

CreateUser -> create user routes POST /user

func (*UserController) DeleteUser

func (u *UserController) DeleteUser(c *gin.Context)

DeleteUser -> delete user routes by id DELETE /user/:id

func (*UserController) GetUser

func (u *UserController) GetUser(c *gin.Context)

GetUser -> get user by id routes GET /user/:id

func (*UserController) GetUsers

func (u *UserController) GetUsers(c *gin.Context)

GetUsers -> get users routes GET /users

func (*UserController) UpdateUser

func (u *UserController) UpdateUser(c *gin.Context)

UpdateUser -> update user routes by id PATCH /user/:id

Jump to

Keyboard shortcuts

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