-
Notifications
You must be signed in to change notification settings - Fork 9
/
clients.go
155 lines (135 loc) · 5.49 KB
/
clients.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/go-sigma/sigma/pkg/handlers/distribution/clients (interfaces: Clients)
//
// Generated by this command:
//
// mockgen -destination=mocks/clients.go -package=mocks github.com/go-sigma/sigma/pkg/handlers/distribution/clients Clients
//
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
io "io"
http "net/http"
reflect "reflect"
distribution "github.com/distribution/distribution/v3"
digest "github.com/opencontainers/go-digest"
gomock "go.uber.org/mock/gomock"
)
// MockClients is a mock of Clients interface.
type MockClients struct {
ctrl *gomock.Controller
recorder *MockClientsMockRecorder
}
// MockClientsMockRecorder is the mock recorder for MockClients.
type MockClientsMockRecorder struct {
mock *MockClients
}
// NewMockClients creates a new mock instance.
func NewMockClients(ctrl *gomock.Controller) *MockClients {
mock := &MockClients{ctrl: ctrl}
mock.recorder = &MockClientsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClients) EXPECT() *MockClientsMockRecorder {
return m.recorder
}
// AuthToken mocks base method.
func (m *MockClients) AuthToken() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AuthToken")
ret0, _ := ret[0].(error)
return ret0
}
// AuthToken indicates an expected call of AuthToken.
func (mr *MockClientsMockRecorder) AuthToken() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthToken", reflect.TypeOf((*MockClients)(nil).AuthToken))
}
// DoRequest mocks base method.
func (m *MockClients) DoRequest(arg0 context.Context, arg1, arg2 string, arg3 http.Header, arg4 ...io.Reader) (int, http.Header, io.ReadCloser, error) {
m.ctrl.T.Helper()
varargs := []any{arg0, arg1, arg2, arg3}
for _, a := range arg4 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "DoRequest", varargs...)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(http.Header)
ret2, _ := ret[2].(io.ReadCloser)
ret3, _ := ret[3].(error)
return ret0, ret1, ret2, ret3
}
// DoRequest indicates an expected call of DoRequest.
func (mr *MockClientsMockRecorder) DoRequest(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DoRequest", reflect.TypeOf((*MockClients)(nil).DoRequest), varargs...)
}
// GetBlob mocks base method.
func (m *MockClients) GetBlob(arg0 context.Context, arg1 string, arg2 digest.Digest) (distribution.Descriptor, io.ReadCloser, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBlob", arg0, arg1, arg2)
ret0, _ := ret[0].(distribution.Descriptor)
ret1, _ := ret[1].(io.ReadCloser)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetBlob indicates an expected call of GetBlob.
func (mr *MockClientsMockRecorder) GetBlob(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlob", reflect.TypeOf((*MockClients)(nil).GetBlob), arg0, arg1, arg2)
}
// GetManifest mocks base method.
func (m *MockClients) GetManifest(arg0 context.Context, arg1, arg2 string) (distribution.Manifest, distribution.Descriptor, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetManifest", arg0, arg1, arg2)
ret0, _ := ret[0].(distribution.Manifest)
ret1, _ := ret[1].(distribution.Descriptor)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetManifest indicates an expected call of GetManifest.
func (mr *MockClientsMockRecorder) GetManifest(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetManifest", reflect.TypeOf((*MockClients)(nil).GetManifest), arg0, arg1, arg2)
}
// HeadBlob mocks base method.
func (m *MockClients) HeadBlob(arg0 context.Context, arg1 string, arg2 digest.Digest) (distribution.Descriptor, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HeadBlob", arg0, arg1, arg2)
ret0, _ := ret[0].(distribution.Descriptor)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// HeadBlob indicates an expected call of HeadBlob.
func (mr *MockClientsMockRecorder) HeadBlob(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadBlob", reflect.TypeOf((*MockClients)(nil).HeadBlob), arg0, arg1, arg2)
}
// HeadManifest mocks base method.
func (m *MockClients) HeadManifest(arg0 context.Context, arg1, arg2 string) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HeadManifest", arg0, arg1, arg2)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// HeadManifest indicates an expected call of HeadManifest.
func (mr *MockClientsMockRecorder) HeadManifest(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HeadManifest", reflect.TypeOf((*MockClients)(nil).HeadManifest), arg0, arg1, arg2)
}
// PutBlob mocks base method.
func (m *MockClients) PutBlob(arg0 context.Context, arg1 string, arg2 digest.Digest, arg3 io.Reader) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PutBlob", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// PutBlob indicates an expected call of PutBlob.
func (mr *MockClientsMockRecorder) PutBlob(arg0, arg1, arg2, arg3 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutBlob", reflect.TypeOf((*MockClients)(nil).PutBlob), arg0, arg1, arg2, arg3)
}