forked from romapres2010/httpserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_service.go
More file actions
24 lines (20 loc) · 931 Bytes
/
Copy pathmodel_service.go
File metadata and controls
24 lines (20 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package model
import (
"context"
)
// DeptService represent basic interface for Dept
type DeptService interface {
GetDept(ctx context.Context, out *Dept) (bool, error)
GetDeptsPK(ctx context.Context, out *DeptPKs) error
CreateDept(ctx context.Context, in *Dept, out *Dept) error
UpdateDept(ctx context.Context, in *Dept, out *Dept) (bool, error)
//RandomGetDept(ctx context.Context, v *Dept) error // Для целей нагрузочного тестирования
//RandomUpdateDept(ctx context.Context, v *Dept) error // Для целей нагрузочного тестирования
}
// EmpService represent basic interface for Emp
type EmpService interface {
GetEmp(ctx context.Context, out *Emp) (bool, error)
GetEmpsByDept(ctx context.Context, in *Dept, out *EmpSlice) error
CreateEmp(ctx context.Context, in *Emp, out *Emp) error
UpdateEmp(ctx context.Context, in *Emp, out *Emp) (bool, error)
}