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

Function newTransportWithRegistryAuth

cli/internal/publish/plugins.go:89–96  ·  view source on GitHub ↗
(insecureSkipVerify bool, registryAuth string)

Source from the content-addressed store, hash-verified

87}
88
89func newTransportWithRegistryAuth(insecureSkipVerify bool, registryAuth string) *transportWithRegistryAuth {
90 baseTransport := http.DefaultTransport.(*http.Transport).Clone()
91 baseTransport.TLSClientConfig.InsecureSkipVerify = insecureSkipVerify
92 return &transportWithRegistryAuth{
93 baseTransport: baseTransport,
94 registryAuth: registryAuth,
95 }
96}
97
98func (t *transportWithRegistryAuth) RoundTrip(req *http.Request) (resp *http.Response, err error) {
99 req.Header.Set("Authorization", "Bearer "+t.registryAuth)

Callers 1

getManifestServiceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected