Skip to content

Commit

Permalink
fix up dep update
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3rw3rk committed Jan 31, 2024
1 parent e994e1e commit 4a5c560
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
18 changes: 9 additions & 9 deletions mock/docker/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ type ContainerService struct{}
// Docker container.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerAttach
func (c *ContainerService) ContainerAttach(ctx context.Context, ctn string, options types.ContainerAttachOptions) (types.HijackedResponse, error) {
func (c *ContainerService) ContainerAttach(ctx context.Context, ctn string, options container.AttachOptions) (types.HijackedResponse, error) {
return types.HijackedResponse{}, nil
}

// ContainerCommit is a helper function to simulate
// a mocked call to apply changes to a Docker container.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerCommit
func (c *ContainerService) ContainerCommit(ctx context.Context, ctn string, options types.ContainerCommitOptions) (types.IDResponse, error) {
func (c *ContainerService) ContainerCommit(ctx context.Context, ctn string, options container.CommitOptions) (types.IDResponse, error) {
return types.IDResponse{}, nil
}

Expand Down Expand Up @@ -96,7 +96,7 @@ func (c *ContainerService) ContainerCreate(ctx context.Context, config *containe
// filesystem between two Docker containers.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerDiff
func (c *ContainerService) ContainerDiff(ctx context.Context, ctn string) ([]container.ContainerChangeResponseItem, error) {
func (c *ContainerService) ContainerDiff(ctx context.Context, ctn string) ([]container.FilesystemChange, error) {
return nil, nil
}

Expand Down Expand Up @@ -132,7 +132,7 @@ func (c *ContainerService) ContainerExecInspect(ctx context.Context, execID stri
// inside a Docker container.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerExecResize
func (c *ContainerService) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error {
func (c *ContainerService) ContainerExecResize(ctx context.Context, execID string, options container.ResizeOptions) error {
return nil
}

Expand Down Expand Up @@ -264,7 +264,7 @@ func (c *ContainerService) ContainerKill(ctx context.Context, ctn, signal string
// a mocked call to list Docker containers.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerList
func (c *ContainerService) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) {
func (c *ContainerService) ContainerList(ctx context.Context, options container.ListOptions) ([]types.Container, error) {
return nil, nil
}

Expand All @@ -273,7 +273,7 @@ func (c *ContainerService) ContainerList(ctx context.Context, options types.Cont
// Docker container.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerLogs
func (c *ContainerService) ContainerLogs(ctx context.Context, ctn string, options types.ContainerLogsOptions) (io.ReadCloser, error) {
func (c *ContainerService) ContainerLogs(ctx context.Context, ctn string, options container.LogsOptions) (io.ReadCloser, error) {
// verify a container was provided
if len(ctn) == 0 {
return nil, errors.New("no container provided")
Expand Down Expand Up @@ -320,7 +320,7 @@ func (c *ContainerService) ContainerPause(ctx context.Context, ctn string) error
// a mocked call to remove a Docker container.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerRemove
func (c *ContainerService) ContainerRemove(ctx context.Context, ctn string, options types.ContainerRemoveOptions) error {
func (c *ContainerService) ContainerRemove(ctx context.Context, ctn string, options container.RemoveOptions) error {
// verify a container was provided
if len(ctn) == 0 {
return errors.New("no container provided")
Expand All @@ -347,7 +347,7 @@ func (c *ContainerService) ContainerRename(ctx context.Context, container, newCo
// a mocked call to resize a Docker container.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerResize
func (c *ContainerService) ContainerResize(ctx context.Context, ctn string, options types.ResizeOptions) error {
func (c *ContainerService) ContainerResize(ctx context.Context, ctn string, options container.ResizeOptions) error {
return nil
}

Expand All @@ -363,7 +363,7 @@ func (c *ContainerService) ContainerRestart(ctx context.Context, ctn string, opt
// a mocked call to start a Docker container.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerStart
func (c *ContainerService) ContainerStart(ctx context.Context, ctn string, options types.ContainerStartOptions) error {
func (c *ContainerService) ContainerStart(ctx context.Context, ctn string, options container.StartOptions) error {
// verify a container was provided
if len(ctn) == 0 {
return errors.New("no container provided")
Expand Down
7 changes: 4 additions & 3 deletions mock/docker/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/registry"
"github.com/docker/docker/api/types/system"
"github.com/docker/docker/client"
)

Expand Down Expand Up @@ -38,8 +39,8 @@ func (s *SystemService) Events(ctx context.Context, options types.EventsOptions)
// information from the Docker daemon.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.Info
func (s *SystemService) Info(ctx context.Context) (types.Info, error) {
return types.Info{}, nil
func (s *SystemService) Info(ctx context.Context) (system.Info, error) {
return system.Info{}, nil
}

// Ping is a helper function to simulate
Expand All @@ -56,7 +57,7 @@ func (s *SystemService) Ping(ctx context.Context) (types.Ping, error) {
// daemon against a Docker registry.
//
// https://pkg.go.dev/github.com/docker/docker/client#Client.RegistryLogin
func (s *SystemService) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error) {
func (s *SystemService) RegistryLogin(ctx context.Context, auth registry.AuthConfig) (registry.AuthenticateOKBody, error) {
return registry.AuthenticateOKBody{}, nil
}

Expand Down

0 comments on commit 4a5c560

Please sign in to comment.