8000 fix(agent): deprecated types.AuthConfig by m8vago · Pull Request #962 · dyrector-io/dyrectorio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(agent): deprecated types.AuthConfig #962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion golang/internal/helper/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/registry"
"github.com/docker/docker/client"
"github.com/docker/docker/errdefs"
"github.com/google/go-containerregistry/pkg/authn"
Expand Down Expand Up @@ -419,7 +420,7 @@ func authConfigToBasicAuth(authConfigEncoded string) (string, error) {
return "", err
}

var authOpts types.AuthConfig
var authOpts registry.AuthConfig
err = json.Unmarshal(authConfigJSON, &authOpts)
if err != nil {
return "", err
Expand Down
5 changes: 2 additions & 3 deletions golang/pkg/builder/container/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"io"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/registry"

"github.com/dyrector-io/dyrectorio/golang/internal/dogger"

Expand All @@ -19,7 +19,7 @@ func registryAuthBase64(user, password string) string {
return ""
}

authConfig := types.AuthConfig{
authConfig := registry.AuthConfig{
Username: user,
Password: password,
}
Expand Down Expand Up @@ -70,7 +70,6 @@ func ReadDockerLogsFromReadCloser(logs io.ReadCloser, skip, take int) []string {
count := binary.BigEndian.Uint32(header[4:])
data := make([]byte, count)
_, err = logs.Read(data)

if err != nil {
if err != io.EOF {
panic(err)
Expand Down
0