| 68 | } |
| 69 | |
| 70 | func (s *Spec) Validate() error { |
| 71 | if s.BatchWriter && s.StreamBatchWriter { |
| 72 | return errors.New("batch_writer and stream_batch_writer cannot be true at the same time") |
| 73 | } |
| 74 | if s.BatchWriter && s.MixedBatchWriter { |
| 75 | return errors.New("batch_writer and mixed_batch_writer cannot be true at the same time") |
| 76 | } |
| 77 | if s.StreamBatchWriter && s.MixedBatchWriter { |
| 78 | return errors.New("stream_batch_writer and mixed_batch_writer cannot be true at the same time") |
| 79 | } |
| 80 | return nil |
| 81 | } |
| 82 | |
| 83 | func ptr[A any](a A) *A { |
| 84 | return &a |