MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / Validate

Method Validate

plugins/destination/kafka/client/spec/spec.go:78–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}
77
78func (s *Spec) Validate() error {
79 if len(s.Brokers) == 0 {
80 return errors.New("at least one broker is required")
81 }
82
83 // required for s.FileSpec.Validate call
84 err := s.FileSpec.UnmarshalSpec()
85 if err != nil {
86 return err
87 }
88 s.FileSpec.SetDefaults()
89
90 return s.FileSpec.Validate()
91}

Callers 1

NewFunction · 0.45

Calls 2

UnmarshalSpecMethod · 0.45
SetDefaultsMethod · 0.45

Tested by

no test coverage detected