(ctx context.Context, _ zerolog.Logger, specBytes []byte)
| 239 | } |
| 240 | |
| 241 | func TestConnection(ctx context.Context, _ zerolog.Logger, specBytes []byte) error { |
| 242 | var s Spec |
| 243 | if err := json.Unmarshal(specBytes, &s); err != nil { |
| 244 | return &plugin.TestConnError{ |
| 245 | Code: "INVALID_SPEC", |
| 246 | Message: fmt.Errorf("failed to unmarshal spec: %w", err), |
| 247 | } |
| 248 | } |
| 249 | s.SetDefaults() |
| 250 | |
| 251 | return nil |
| 252 | } |
| 253 | |
| 254 | // genericBatchWriter is a generic interface for batch writers. There are currently 3 implementations, but the mixedbatchwriter |
| 255 | // is different so we need to adapt it to the interface. |
nothing calls this directly
no test coverage detected