阶段性提交

This commit is contained in:
刘祥超
2020-09-06 16:19:54 +08:00
parent 5c17caa416
commit 6f5faf66f7
37 changed files with 3134 additions and 91 deletions

View 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
}