-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnode_params.go
More file actions
43 lines (38 loc) · 1.45 KB
/
node_params.go
File metadata and controls
43 lines (38 loc) · 1.45 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
package controller
import (
"fmt"
)
type NodeParams struct {
Name *string
Host *string
OrgId *string
Tags *string
PairingId *string
PairingKey *string
AgentFile *string
InstallFile *string
SSHOptions *string
ConfirmDelete *string
Export *string
Private *bool
}
func NewNodeParams() *NodeParams {
return new(NodeParams)
}
func (params *NodeParams) ValidateName(required bool) error {
if required && *params.Name == "" {
return fmt.Errorf("name cannot be empty")
}
return nil
}
func (params *NodeParams) ValidateHost(required bool) error { return nil }
func (params *NodeParams) ValidateOrgId(required bool) error { return nil }
func (params *NodeParams) ValidateTags(required bool) error { return nil }
func (params *NodeParams) ValidateConfirmDelete(required bool) error { return nil }
func (params *NodeParams) ValidateExport(required bool) error { return nil }
func (params *NodeParams) ValidatePrivate(required bool) error { return nil }
func (params *NodeParams) ValidatePairingId(required bool) error { return nil }
func (params *NodeParams) ValidatePairingKey(required bool) error { return nil }
func (params *NodeParams) ValidateAgentFile(required bool) error { return nil }
func (params *NodeParams) ValidateInstallFile(required bool) error { return nil }
func (params *NodeParams) ValidateSSHOptions(required bool) error { return nil }