db

package
v0.0.0-...-cc74c3e Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *model.DBConfig) (model.DB, error)

Types

type Count

type Count interface {
	GenEmployeeNumber() int
}

type DB

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

func (*DB) AddEmployee

func (db *DB) AddEmployee(employee model.Employee) (model.Employee, error)

func (*DB) DeleteEmployee

func (db *DB) DeleteEmployee(employee model.Employee) (model.Employee, error)

func (*DB) GenEmployeeNumber

func (db *DB) GenEmployeeNumber() int

func (*DB) ListEmployees

func (db *DB) ListEmployees(search string) ([]model.Employee, error)

func (*DB) RestoreEmployee

func (db *DB) RestoreEmployee(employee model.Employee) (model.Employee, error)

func (*DB) SearchEmployees

func (db *DB) SearchEmployees(search string) ([]model.Employee, error)

func (*DB) UpdateEmployee

func (db *DB) UpdateEmployee(employee model.Employee) (bool, error)

Jump to

Keyboard shortcuts

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