(destinations []*specs.Destination)
| 31 | } |
| 32 | |
| 33 | func 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 | |
| 42 | func GetAuthTokenIfNeeded(logger zerolog.Logger, sources []*specs.Source, destinations []*specs.Destination, transformers []*specs.Transformer) (cqapiauth.Token, error) { |
| 43 | needsToken := sourcesNeedToken(sources) || destinationsNeedToken(destinations) || transformerNeedsToken(transformers) |
no test coverage detected