MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / destinationsNeedToken

Function destinationsNeedToken

cli/internal/auth/token.go:33–40  ·  view source on GitHub ↗
(destinations []*specs.Destination)

Source from the content-addressed store, hash-verified

31}
32
33func destinationsNeedToken(destinations []*specs.Destination) bool {
34 for _, destination := range destinations {
35 if tokenNeeded(destination.Registry, destination.Path) {
36 return true
37 }
38 }
39 return false
40}
41
42func GetAuthTokenIfNeeded(logger zerolog.Logger, sources []*specs.Source, destinations []*specs.Destination, transformers []*specs.Transformer) (cqapiauth.Token, error) {
43 needsToken := sourcesNeedToken(sources) || destinationsNeedToken(destinations) || transformerNeedsToken(transformers)

Callers 1

GetAuthTokenIfNeededFunction · 0.85

Calls 1

tokenNeededFunction · 0.85

Tested by

no test coverage detected