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

Function CLIRegistryToPbRegistry

cli/cmd/specs.go:19–32  ·  view source on GitHub ↗
(registry specs.Registry)

Source from the content-addressed store, hash-verified

17)
18
19func CLIRegistryToPbRegistry(registry specs.Registry) pbSpecs.Registry {
20 switch registry {
21 case specs.RegistryGitHub:
22 return pbSpecs.RegistryGithub
23 case specs.RegistryLocal:
24 return pbSpecs.RegistryLocal
25 case specs.RegistryGRPC:
26 return pbSpecs.RegistryGrpc
27 case specs.RegistryCloudQuery:
28 return pbSpecs.RegistryCloudQuery
29 default:
30 panic(fmt.Sprintf("unknown registry %q", registry.String()))
31 }
32}
33
34// This converts CLI configuration to a source spec prior to V3 version
35// when our spec wasn't decoupled from the over the wire protocol

Callers 2

CLISourceSpecToPbSpecFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected