staffapp

package
v0.0.0-...-1920916 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New(repo StaffRepo) *App

func (*App) AddEmployee

func (a *App) AddEmployee(ctx context.Context, employee domain.Employee) (uint64, error)

func (*App) DeleteEmployee

func (a *App) DeleteEmployee(ctx context.Context, id uint64) error

func (*App) GetEmployee

func (a *App) GetEmployee(ctx context.Context, id uint64) (domain.Employee, error)

func (*App) ListEmployee

func (a *App) ListEmployee(ctx context.Context) ([]domain.Employee, error)

func (*App) UpdateEmployee

func (a *App) UpdateEmployee(ctx context.Context, employee domain.Employee) (domain.Employee, error)

type StaffRepo

type StaffRepo interface {
	Save(ctx context.Context, e domain.Employee) (uint64, error)
	Get(ctx context.Context, id uint64) (domain.Employee, error)
	Update(ctx context.Context, u domain.Employee) (domain.Employee, error)
	Delete(ctx context.Context, id uint64) error
	List(ctx context.Context) ([]domain.Employee, error)
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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