Sebastiaan van Stijn 23148220ec
vendor: github.com/docker/docker c6aaabc9fc82 (master / v27.0.0-dev)
- api: move more network-related types to api/types/network

full diff: cd3804655a...c6aaabc9fc

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-05 16:29:55 +02:00

23 lines
641 B
Go

package network
import (
"context"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
)
// FakeClient is a fake NetworkAPIClient
type FakeClient struct {
client.NetworkAPIClient
NetworkInspectFunc func(ctx context.Context, networkID string, options network.InspectOptions) (network.Inspect, error)
}
// NetworkInspect fakes inspecting a network
func (c *FakeClient) NetworkInspect(ctx context.Context, networkID string, options network.InspectOptions) (network.Inspect, error) {
if c.NetworkInspectFunc != nil {
return c.NetworkInspectFunc(ctx, networkID, options)
}
return network.Inspect{}, nil
}