mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-22 22:40:29 +08:00
阶段性提交
This commit is contained in:
22
internal/installers/params_node.go
Normal file
22
internal/installers/params_node.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package installers
|
||||
|
||||
import "errors"
|
||||
|
||||
type NodeParams struct {
|
||||
Endpoint string
|
||||
NodeId string
|
||||
Secret string
|
||||
}
|
||||
|
||||
func (this *NodeParams) Validate() error {
|
||||
if len(this.Endpoint) == 0 {
|
||||
return errors.New("'endpoint' should not be empty")
|
||||
}
|
||||
if len(this.NodeId) == 0 {
|
||||
return errors.New("'nodeId' should not be empty")
|
||||
}
|
||||
if len(this.Secret) == 0 {
|
||||
return errors.New("'secret' should not be empty")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user