File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,13 @@ an underscore (_) in chart version tags when pushing to a registry and back to
51
51
a plus (+) when pulling from a registry.`
52
52
53
53
type (
54
+ // RemoteClient shadows the ORAS remote.Client interface
55
+ // (hiding the ORAS type from Helm client visibility)
56
+ // https://pkg.go.dev/oras.land/oras-go/pkg/registry/remote#Client
57
+ RemoteClient interface {
58
+ Do (req * http.Request ) (* http.Response , error )
59
+ }
60
+
54
61
// Client works with OCI-compliant registries
55
62
Client struct {
56
63
debug bool
61
68
password string
62
69
out io.Writer
63
70
authorizer auth.Client
64
- registryAuthorizer * registryauth. Client
71
+ registryAuthorizer RemoteClient
65
72
resolver func (ref registry.Reference ) (remotes.Resolver , error )
66
73
httpClient * http.Client
67
74
plainHTTP bool
@@ -220,7 +227,7 @@ func ClientOptAuthorizer(authorizer auth.Client) ClientOption {
220
227
// can be used to override the default authorization mechanism.
221
228
//
222
229
// Depending on the use-case you may need to set both ClientOptAuthorizer and ClientOptRegistryAuthorizer.
223
- func ClientOptRegistryAuthorizer (registryAuthorizer * registryauth. Client ) ClientOption {
230
+ func ClientOptRegistryAuthorizer (registryAuthorizer RemoteClient ) ClientOption {
224
231
return func (client * Client ) {
225
232
client .registryAuthorizer = registryAuthorizer
226
233
}
You can’t perform that action at this time.
0 commit comments