handlers

package
v0.0.0-...-378dc56 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory describe factory for handlers

func NewFactory

func NewFactory(dbConn *pg.DB) *Factory

NewFactory creates a new handler factory

func (*Factory) WorkPlaceHandler

func (f *Factory) WorkPlaceHandler() *WorkplaceHandler

WorkPlaceHandler getting workplace handler

type WorkplaceHandler

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

WorkplaceHandler describe workplace handler

func NewWorkplaceHandler

func NewWorkplaceHandler(s WorkplaceService) *WorkplaceHandler

NewWorkplaceHandler create a new workplace handler

func (*WorkplaceHandler) Add

Add handle of adding new workplace

func (*WorkplaceHandler) Delete

func (h *WorkplaceHandler) Delete(w http.ResponseWriter, r *http.Request)

Delete handle of deleting the workplace

type WorkplaceService

type WorkplaceService interface {
	Add(ctx context.Context, workplaceInfo *model.WorkplaceInfo) e.Error
	Delete(ctx context.Context, ID int) e.Error
}

WorkplaceService describe workplace service

Jump to

Keyboard shortcuts

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