platformToken returns the platform-destination cqpd_ token from its explicit CQ_PLATFORM_TOKEN env, or from CLOUDQUERY_API_KEY when that holds a cqpd_ (the standard credential env doubling as the platform token). "" when neither applies — i.e. no headless platform-destination token is configured. On
()
| 136 | // applies — i.e. no headless platform-destination token is configured. One |
| 137 | // helper so download, injection, and tenant detection treat both envs alike. |
| 138 | func platformToken() string { |
| 139 | if t := os.Getenv(EnvPlatformToken); t != "" { |
| 140 | return t |
| 141 | } |
| 142 | if k := os.Getenv("CLOUDQUERY_API_KEY"); strings.HasPrefix(k, cqpdPrefix) { |
| 143 | return k |
| 144 | } |
| 145 | return "" |
| 146 | } |
| 147 | |
| 148 | // PropagatePluginCredential makes a headless cqpd_ token available to spawned |
| 149 | // source/destination plugins as CLOUDQUERY_API_KEY. Plugins validate premium |
no outgoing calls
no test coverage detected