(relaxed bool)
| 111 | } |
| 112 | |
| 113 | func (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 | } |
no outgoing calls