-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathca_params.go
More file actions
57 lines (51 loc) · 2.05 KB
/
ca_params.go
File metadata and controls
57 lines (51 loc) · 2.05 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package controller
import (
"fmt"
)
// First-class types only
type CAParams struct {
Name *string
Tags *string
CaExpiry *int
CertExpiry *int
KeyType *string
DnLocality *string
DnState *string
DnOrg *string
DnOrgUnit *string
DnCountry *string
DnStreet *string
DnPostal *string
ConfirmDelete *string
Export *string
Private *bool
CertFile *string
KeyFile *string
}
func NewCAParams() *CAParams {
return new(CAParams)
}
// ThreatSpec TMv0.1 for CAParams.ValidateName
// Does name parameter validation for App:CAController
func (params *CAParams) ValidateName(required bool) error {
if required && *params.Name == "" {
return fmt.Errorf("name cannot be empty")
}
return nil
}
func (params *CAParams) ValidateTags(required bool) error { return nil }
func (params *CAParams) ValidateCAExpiry(required bool) error { return nil }
func (params *CAParams) ValidateCertExpiry(required bool) error { return nil }
func (params *CAParams) ValidateKeyType(required bool) error { return nil }
func (params *CAParams) ValidateDnLocality(required bool) error { return nil }
func (params *CAParams) ValidateDnState(required bool) error { return nil }
func (params *CAParams) ValidateDnOrg(required bool) error { return nil }
func (params *CAParams) ValidateDnOrgUnit(required bool) error { return nil }
func (params *CAParams) ValidateDnCountry(required bool) error { return nil }
func (params *CAParams) ValidateDnStreet(required bool) error { return nil }
func (params *CAParams) ValidateDnPostal(required bool) error { return nil }
func (params *CAParams) ValidateConfirmDelete(required bool) error { return nil }
func (params *CAParams) ValidateExport(required bool) error { return nil }
func (params *CAParams) ValidatePrivate(required bool) error { return nil }
func (params *CAParams) ValidateCertFile(required bool) error { return nil }
func (params *CAParams) ValidateKeyFile(required bool) error { return nil }