forked from mittwald/goharbor-client
/
scan_client_service.go
104 lines (83 loc) · 3.21 KB
/
scan_client_service.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
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (
runtime "github.com/go-openapi/runtime"
mock "github.com/stretchr/testify/mock"
scan "github.com/ethenq/goharbor-client/v5/apiv2/internal/api/client/scan"
)
// MockScanClientService is an autogenerated mock type for the ClientService type
type MockScanClientService struct {
mock.Mock
}
// GetReportLog provides a mock function with given fields: params, authInfo
func (_m *MockScanClientService) GetReportLog(params *scan.GetReportLogParams, authInfo runtime.ClientAuthInfoWriter) (*scan.GetReportLogOK, error) {
ret := _m.Called(params, authInfo)
var r0 *scan.GetReportLogOK
if rf, ok := ret.Get(0).(func(*scan.GetReportLogParams, runtime.ClientAuthInfoWriter) *scan.GetReportLogOK); ok {
r0 = rf(params, authInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*scan.GetReportLogOK)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*scan.GetReportLogParams, runtime.ClientAuthInfoWriter) error); ok {
r1 = rf(params, authInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ScanArtifact provides a mock function with given fields: params, authInfo
func (_m *MockScanClientService) ScanArtifact(params *scan.ScanArtifactParams, authInfo runtime.ClientAuthInfoWriter) (*scan.ScanArtifactAccepted, error) {
ret := _m.Called(params, authInfo)
var r0 *scan.ScanArtifactAccepted
if rf, ok := ret.Get(0).(func(*scan.ScanArtifactParams, runtime.ClientAuthInfoWriter) *scan.ScanArtifactAccepted); ok {
r0 = rf(params, authInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*scan.ScanArtifactAccepted)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*scan.ScanArtifactParams, runtime.ClientAuthInfoWriter) error); ok {
r1 = rf(params, authInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// SetTransport provides a mock function with given fields: transport
func (_m *MockScanClientService) SetTransport(transport runtime.ClientTransport) {
_m.Called(transport)
}
// StopScanArtifact provides a mock function with given fields: params, authInfo
func (_m *MockScanClientService) StopScanArtifact(params *scan.StopScanArtifactParams, authInfo runtime.ClientAuthInfoWriter) (*scan.StopScanArtifactAccepted, error) {
ret := _m.Called(params, authInfo)
var r0 *scan.StopScanArtifactAccepted
if rf, ok := ret.Get(0).(func(*scan.StopScanArtifactParams, runtime.ClientAuthInfoWriter) *scan.StopScanArtifactAccepted); ok {
r0 = rf(params, authInfo)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*scan.StopScanArtifactAccepted)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*scan.StopScanArtifactParams, runtime.ClientAuthInfoWriter) error); ok {
r1 = rf(params, authInfo)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewMockScanClientService interface {
mock.TestingT
Cleanup(func())
}
// NewMockScanClientService creates a new instance of MockScanClientService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockScanClientService(t mockConstructorTestingTNewMockScanClientService) *MockScanClientService {
mock := &MockScanClientService{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}