-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstandards.go
43 lines (35 loc) · 1.03 KB
/
standards.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package root
type Controls struct {
ControlName string `json:"controlName"`
ControlInfo ControlInfo `json:"controlInfo"`
}
type ControlInfo struct {
Family string `json:"family"`
Name string `json:"name"`
Description string `json:"desc"`
}
type Standard struct {
StandardName string `json:"standardName"`
Controls[] Controls `json:"controls"`
}
type Certification struct {
CertificationName string `json:"certificationName"`
StandardName string `json:"standardName"`
ControlName[] string `json:"controls"`
}
type UserControlModel struct {
Control string
Status int
}
type UserCertModel struct {
UserName string
Controls []UserControlModel
}
type StandardService interface {
CreateStandard(u *Standard) error
GetStandardInfo(standardname string) (error, []Standard)
CreateCertification(u *Certification) error
GetCertificationInfo(certificationName string) (error, []Certification)
AddCertificationToUser(model UserCertModel) error
GetCertificationForUser(userName string) (error, []UserControlModel)
}