controller

package
v0.0.0-...-990e857 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmployeeController

type EmployeeController struct {
	EmployeePersist persistence.IEmployeePersist
}

EmployeeController handler for Employee DTO CRUD requests

func NewEmployeeController

func NewEmployeeController(employeePersist persistence.IEmployeePersist) *EmployeeController

NewEmployeeController is the constructor

func (*EmployeeController) CreateEmployee

func (ec *EmployeeController) CreateEmployee(c echo.Context) error

CreateEmployee handles the POST endpoint for creating new employees

func (*EmployeeController) DeleteEmployee

func (ec *EmployeeController) DeleteEmployee(c echo.Context) error

DeleteEmployee handles the DELETE request, taking an employee `id` as parameter

func (*EmployeeController) GetAllEmployees

func (ec *EmployeeController) GetAllEmployees(c echo.Context) error

GetEmployees GET all employees

func (*EmployeeController) GetEmployee

func (ec *EmployeeController) GetEmployee(c echo.Context) error

GetEmployee handles the GET request for one employee identified by `id`

Jump to

Keyboard shortcuts

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