-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcsr_params.go
More file actions
56 lines (51 loc) · 2.09 KB
/
csr_params.go
File metadata and controls
56 lines (51 loc) · 2.09 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
package controller
import (
"fmt"
)
type CSRParams struct {
Name *string
Tags *string
StandaloneFile *string
Expiry *int
Ca *string
KeyType *string
DnLocality *string
DnState *string
DnOrg *string
DnOrgUnit *string
DnCountry *string
DnStreet *string
DnPostal *string
ConfirmDelete *string
Export *string
Private *bool
KeepSubject *bool
CsrFile *string
KeyFile *string
}
func NewCSRParams() *CSRParams {
return new(CSRParams)
}
func (params *CSRParams) ValidateName(required bool) error {
if required && *params.Name == "" {
return fmt.Errorf("name cannot be empty")
}
return nil
}
func (params *CSRParams) ValidateStandalone(required bool) error { return nil }
func (params *CSRParams) ValidateTags(required bool) error { return nil }
func (params *CSRParams) ValidateExpiry(required bool) error { return nil }
func (params *CSRParams) ValidateKeyType(required bool) error { return nil }
func (params *CSRParams) ValidateDnLocality(required bool) error { return nil }
func (params *CSRParams) ValidateDnState(required bool) error { return nil }
func (params *CSRParams) ValidateDnOrg(required bool) error { return nil }
func (params *CSRParams) ValidateDnOrgUnit(required bool) error { return nil }
func (params *CSRParams) ValidateDnCountry(required bool) error { return nil }
func (params *CSRParams) ValidateDnStreet(required bool) error { return nil }
func (params *CSRParams) ValidateDnPostal(required bool) error { return nil }
func (params *CSRParams) ValidateConfirmDelete(required bool) error { return nil }
func (params *CSRParams) ValidateExport(required bool) error { return nil }
func (params *CSRParams) ValidatePrivate(required bool) error { return nil }
func (params *CSRParams) ValidateKeepSubject(required bool) error { return nil }
func (params *CSRParams) ValidateCSRFile(required bool) error { return nil }
func (params *CSRParams) ValidateKeyFile(required bool) error { return nil }