employee

package
v0.0.0-...-badf2f2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PassportEmpAssocService

type PassportEmpAssocService interface {
	DeleleEmployeeByID(ctx context.Context, EmployeeID string) error
}

PassportEmpAssocService interface

type Repository

type Repository interface {
	FindByID(ctx context.Context, id string) (*types.Employee, error)
	FindAll(ctx context.Context) ([]types.Employee, error)
	FindByPassportID(ctx context.Context, PassportID string) (*types.Employee, error)
	FindByDateOfExpiry(ctx context.Context, DateOfExpiry string) ([]types.Employee, error)
	Create(ctx context.Context, emp types.Employee) (string, error)
	Update(ctx context.Context, emp types.Employee) error
	Delete(ctx context.Context, id string) error
}

Repository for Employee

type Service

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

Service is an employee

func NewService

func NewService(repo Repository, passEmpAssoc PassportEmpAssocService) *Service

NewService return a new service Service(repo, passEmpAssoc)

func (*Service) Create

func (s *Service) Create(ctx context.Context, emp types.Employee) (string, error)

func (*Service) GetAll

func (s *Service) GetAll(ctx context.Context) ([]types.Employee, error)

func (*Service) GetByDateOfExpiry

func (s *Service) GetByDateOfExpiry(ctx context.Context, dateOfExpiry string) ([]types.Employee, error)

func (*Service) GetByID

func (s *Service) GetByID(ctx context.Context, id string) (*types.Employee, error)

func (*Service) GetByPassportID

func (s *Service) GetByPassportID(ctx context.Context, passportID string) (*types.Employee, error)

func (*Service) Update

func (s *Service) Update(ctx context.Context, emp types.Employee) error

Jump to

Keyboard shortcuts

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