handlers

package
v0.0.0-...-befd7ab Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HRwebpage = "<!DOCTYPE html><html>" +
	"<head>" +
	"<title>Human Resources Management</title>" +
	"</head>" +
	"<body>" +
	"<p>Human Resources service</p>" +
	"</body>" +
	"</html>"

temporary HR index page

Functions

func CreateEmployee

func CreateEmployee(er repository.EmployeeRepository) func(http.ResponseWriter, *http.Request)

CreateEmployee creates employee document in MongoDB's database "hr", collection "employees" POST/ employees

func DeleteEmployee

func DeleteEmployee(er repository.EmployeeRepository) func(http.ResponseWriter, *http.Request)

DeleteEmployee delets employee document from MongoDB's database "hr", collection "employees" DELETE/ employees/{id}

func ShowAllEmployees

func ShowAllEmployees(er repository.EmployeeRepository) func(http.ResponseWriter, *http.Request)

ShowAllEmployees retrieves all employees from MongoDB GET/ employees

func ShowAllEmployeesByPosition

func ShowAllEmployeesByPosition(er repository.EmployeeRepository) func(http.ResponseWriter, *http.Request)

ShowAllEmployeesByPosition retrieves all employees from MongoDB GET/ employees/{position}

func TempIndexPage

func TempIndexPage(writer http.ResponseWriter, request *http.Request)

func UpdateEmployee

func UpdateEmployee(er repository.EmployeeRepository) func(http.ResponseWriter, *http.Request)

UpdateEmployee updates employee document in MongoDB's database "hr", collection "employees" PUT/ employees

Types

This section is empty.

Jump to

Keyboard shortcuts

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