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

Function CLIDestinationSpecToPbSpec

cli/cmd/specs.go:86–97  ·  view source on GitHub ↗
(spec specs.Destination)

Source from the content-addressed store, hash-verified

84}
85
86func CLIDestinationSpecToPbSpec(spec specs.Destination) pbSpecs.Destination {
87 return pbSpecs.Destination{
88 Name: spec.Name,
89 Version: spec.Version,
90 Path: spec.Path,
91 Registry: CLIRegistryToPbRegistry(spec.Registry),
92 WriteMode: CLIWriteModeToPbWriteMode(spec.WriteMode),
93 MigrateMode: CLIMigrateModeToPbMigrateMode(spec.MigrateMode),
94 PKMode: CLIPkModeToPbPKMode(spec.PKMode),
95 Spec: spec.Spec,
96 }
97}
98
99// initPlugin is a simple wrapper that will try to validate the spec before actually passing it to Init.
100func initPlugin(ctx context.Context, client plugin.PluginClient, spec map[string]any, noConnection bool, syncID string) error {

Callers 4

syncConnectionV2Function · 0.85
migrateConnectionV1Function · 0.85
syncConnectionV1Function · 0.85
migrateConnectionV2Function · 0.85

Calls 4

CLIRegistryToPbRegistryFunction · 0.85
CLIPkModeToPbPKModeFunction · 0.85

Tested by

no test coverage detected