This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
NetworkAPIClient.go
94 lines (75 loc) · 2.68 KB
/
NetworkAPIClient.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Code generated by mockery v2.33.0. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
types "github.com/docker/docker/api/types"
)
// NetworkAPIClient is an autogenerated mock type for the NetworkAPIClient type
type NetworkAPIClient struct {
mock.Mock
}
// NetworkCreate provides a mock function with given fields: ctx, name, options
func (_m *NetworkAPIClient) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) {
ret := _m.Called(ctx, name, options)
var r0 types.NetworkCreateResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkCreate) (types.NetworkCreateResponse, error)); ok {
return rf(ctx, name, options)
}
if rf, ok := ret.Get(0).(func(context.Context, string, types.NetworkCreate) types.NetworkCreateResponse); ok {
r0 = rf(ctx, name, options)
} else {
r0 = ret.Get(0).(types.NetworkCreateResponse)
}
if rf, ok := ret.Get(1).(func(context.Context, string, types.NetworkCreate) error); ok {
r1 = rf(ctx, name, options)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NetworkList provides a mock function with given fields: ctx, options
func (_m *NetworkAPIClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
ret := _m.Called(ctx, options)
var r0 []types.NetworkResource
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, types.NetworkListOptions) ([]types.NetworkResource, error)); ok {
return rf(ctx, options)
}
if rf, ok := ret.Get(0).(func(context.Context, types.NetworkListOptions) []types.NetworkResource); ok {
r0 = rf(ctx, options)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]types.NetworkResource)
}
}
if rf, ok := ret.Get(1).(func(context.Context, types.NetworkListOptions) error); ok {
r1 = rf(ctx, options)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NetworkRemove provides a mock function with given fields: ctx, network
func (_m *NetworkAPIClient) NetworkRemove(ctx context.Context, network string) error {
ret := _m.Called(ctx, network)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, network)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewNetworkAPIClient creates a new instance of NetworkAPIClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewNetworkAPIClient(t interface {
mock.TestingT
Cleanup(func())
}) *NetworkAPIClient {
mock := &NetworkAPIClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}