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

Function TestConnection

plugins/destination/test/client/client.go:241–252  ·  view source on GitHub ↗
(ctx context.Context, _ zerolog.Logger, specBytes []byte)

Source from the content-addressed store, hash-verified

239}
240
241func 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.

Callers

nothing calls this directly

Calls 2

SetDefaultsMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected