http

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserHandler

func NewUserHandler(e *echo.Echo, us user.Usecase)

NewUserHandler will initialize the users/ resources endpoint

Types

type LoginResponse

type LoginResponse struct {
	Status      string      `json:"status"`
	ErrorCode   string      `json:"errorCode"`
	Description string      `json:"description"`
	SessionKey  string      `json:"sessionKey"`
	Role        models.Role `json:"role"`
	Email       string      `json:"email"`
	EmpId       string      `json:"empId"`
	FirstName   string      `json:"firstName"`
	LastName    string      `json:"lastName"`
	Position    string      `json:"position"`
	Timestamp   string      `json:"timestamp"`
}

type ResponseError

type ResponseError struct {
	Message string `json:"message"`
}

ResponseError represent the reseponse error struct

type UserHandler

type UserHandler struct {
	Userusecase user.Usecase
}

UserHandler represent the httphandler for article

func (*UserHandler) Delete

func (a *UserHandler) Delete(c echo.Context) error

Delete will delete user by given param

func (*UserHandler) DoLogin

func (a *UserHandler) DoLogin(c echo.Context) error

func (*UserHandler) FetchUsers

func (a *UserHandler) FetchUsers(c echo.Context) error

FetchUsers will fetch the users based on given params

func (*UserHandler) GetByEmpNumber

func (a *UserHandler) GetByEmpNumber(c echo.Context) error

GetByEmpNumber will get user by given emp number

func (*UserHandler) Store

func (a *UserHandler) Store(c echo.Context) error

Store will store the user by given request body

func (*UserHandler) Update

func (a *UserHandler) Update(c echo.Context) error

Update

Jump to

Keyboard shortcuts

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