api

package
v0.0.0-...-14362f8 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

func NewApplication

func NewApplication(api *fiber.App, repository data.EmployeesRepository) *Application

func (*Application) Close

func (a *Application) Close()

func (*Application) SetupRoutes

func (a *Application) SetupRoutes()

type CreateEmployeeDTO

type CreateEmployeeDTO struct {
	Name   string `json:"name"`
	Salary int64  `json:"salary"`
	Age    int    `json:"age"`
}

func (*CreateEmployeeDTO) ToEmployee

func (dto *CreateEmployeeDTO) ToEmployee() *domain.Employee

type EmployeeDTO

type EmployeeDTO struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Salary int64  `json:"salary"`
	Age    int    `json:"age"`
}

func EmployeeToEmployeeDTO

func EmployeeToEmployeeDTO(e *domain.Employee) *EmployeeDTO

func EmployeesToEmployeesDto

func EmployeesToEmployeesDto(employees []domain.Employee) []EmployeeDTO

type ModifyEmployeeDTO

type ModifyEmployeeDTO struct {
	Name   string `json:"name"`
	Salary int64  `json:"salary"`
	Age    int    `json:"age"`
}

func (*ModifyEmployeeDTO) ToEmployee

func (dto *ModifyEmployeeDTO) ToEmployee(id string) *domain.Employee

Jump to

Keyboard shortcuts

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