services

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient interface {
	UpdateWorkplace(info *model.WorkplaceInfo) error
}

APIClient server api client

type ClientService

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

ClientService describe workplace client side

func NewClientService

func NewClientService(client APIClient) *ClientService

NewClientService create a new client service

func (*ClientService) UpdateWorkplace

func (s *ClientService) UpdateWorkplace() (*model.WorkplaceInfo, error)

UpdateWorkplace performing workplace creating or updating

type WorkplaceRepository

type WorkplaceRepository interface {
	Add(ctx context.Context, entity *model.WorkplaceInfo) error
	Delete(ctx context.Context, ID int) error
}

WorkplaceRepository describe workplace repository

type WorkplaceService

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

WorkplaceService describe workplace service

func NewWorkplaceService

func NewWorkplaceService(r WorkplaceRepository) *WorkplaceService

NewWorkplaceService get workplace service

func (WorkplaceService) Add

func (s WorkplaceService) Add(ctx context.Context, workplaceInfo *model.WorkplaceInfo) e.Error

Add adds a new workplace

func (*WorkplaceService) Delete

func (s *WorkplaceService) Delete(ctx context.Context, id int) e.Error

Delete remove a workplace by id

Jump to

Keyboard shortcuts

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