handlers

package
v0.0.0-...-556e172 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadInput

func ReadInput(rBody io.ReadCloser, input interface{}) error

ReadInput from the body

func WriteCustomHTTPError

func WriteCustomHTTPError(w http.ResponseWriter, statusCode int, CustomErrMessage string)

WriteCustomHTTPError **

func WriteHTTPError

func WriteHTTPError(w http.ResponseWriter, statusCode int)

WriteHTTPError return HTTP Error Message

func WriteOKResponse

func WriteOKResponse(w http.ResponseWriter, m interface{})

WriteOKResponse as a standard JSON response with StatusOK

Types

type UserHandlersImpl

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

UserHandlersImpl for handler Functions

func NewUserHandlerImpl

func NewUserHandlerImpl(userService service.UsersService) *UserHandlersImpl

NewUserHandlerImpl inits dependancies for graphQL and Handlers

func (UserHandlersImpl) ApplyLeave

func (userHandlersImpl UserHandlersImpl) ApplyLeave(w http.ResponseWriter, req *http.Request)

ApplyLeave handler Function

func (UserHandlersImpl) GetLeaves

func (userHandlersImpl UserHandlersImpl) GetLeaves(w http.ResponseWriter, req *http.Request)

GetLeaves handler Function

func (UserHandlersImpl) GetLeavesByStatus

func (userHandlersImpl UserHandlersImpl) GetLeavesByStatus(w http.ResponseWriter, req *http.Request)

GetLeavesByStatus handler Function

func (UserHandlersImpl) Login

func (userHandlersImpl UserHandlersImpl) Login(w http.ResponseWriter, req *http.Request)

Login Handler

Jump to

Keyboard shortcuts

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