Documentation ¶
Index ¶
- type PassportEmpAssocService
- type Repository
- type Service
- func (s *Service) Create(ctx context.Context, emp types.Employee) (string, error)
- func (s *Service) GetAll(ctx context.Context) ([]types.Employee, error)
- func (s *Service) GetByDateOfExpiry(ctx context.Context, dateOfExpiry string) ([]types.Employee, error)
- func (s *Service) GetByID(ctx context.Context, id string) (*types.Employee, error)
- func (s *Service) GetByPassportID(ctx context.Context, passportID string) (*types.Employee, error)
- func (s *Service) Update(ctx context.Context, emp types.Employee) error
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) GetByDateOfExpiry ¶
func (*Service) GetByPassportID ¶
Click to show internal directories.
Click to hide internal directories.