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

Method Validate

cli/internal/specs/v0/source.go:113–127  ·  view source on GitHub ↗
(relaxed bool)

Source from the content-addressed store, hash-verified

111}
112
113func (s *Source) Validate(relaxed bool) error {
114 if err := s.Metadata.Validate(); err != nil {
115 return err
116 }
117
118 if len(s.Tables) == 0 {
119 return errors.New("tables configuration is required. Hint: set the tables you want to sync by adding `tables: [...]` or use `cloudquery tables` to list available tables")
120 }
121
122 if !relaxed && len(s.Destinations) == 0 {
123 return errors.New("at least one destination is required")
124 }
125
126 return nil
127}

Calls

no outgoing calls