validation.go 771 字节
Newer Older
1 2
package options

J
Jeff 已提交
3 4
// Validate validates server run options, to find
// options' misconfiguration
5 6 7
func (s *ServerRunOptions) Validate() []error {
	var errors []error

8
	errors = append(errors, s.GenericServerRunOptions.Validate()...)
9 10 11 12 13
	errors = append(errors, s.DevopsOptions.Validate()...)
	errors = append(errors, s.KubernetesOptions.Validate()...)
	errors = append(errors, s.ServiceMeshOptions.Validate()...)
	errors = append(errors, s.MonitoringOptions.Validate()...)
	errors = append(errors, s.SonarQubeOptions.Validate()...)
J
Jeff 已提交
14 15
	errors = append(errors, s.S3Options.Validate()...)
	errors = append(errors, s.OpenPitrixOptions.Validate()...)
16
	errors = append(errors, s.NetworkOptions.Validate()...)
J
Jeff 已提交
17
	errors = append(errors, s.LoggingOptions.Validate()...)
18 19 20

	return errors
}