1
2
3
4
5 package mocks
6
7 import (
8 context "context"
9 reflect "reflect"
10
11 systemd "edge-infra.dev/pkg/sds/lib/dbus/systemd"
12 dbus "github.com/coreos/go-systemd/v22/dbus"
13 gomock "github.com/golang/mock/gomock"
14 )
15
16
17 type MockConnection struct {
18 ctrl *gomock.Controller
19 recorder *MockConnectionMockRecorder
20 }
21
22
23 type MockConnectionMockRecorder struct {
24 mock *MockConnection
25 }
26
27
28 func NewMockConnection(ctrl *gomock.Controller) *MockConnection {
29 mock := &MockConnection{ctrl: ctrl}
30 mock.recorder = &MockConnectionMockRecorder{mock}
31 return mock
32 }
33
34
35 func (m *MockConnection) EXPECT() *MockConnectionMockRecorder {
36 return m.recorder
37 }
38
39
40 func (m *MockConnection) ActiveState(arg0 context.Context, arg1 string) (string, error) {
41 m.ctrl.T.Helper()
42 ret := m.ctrl.Call(m, "ActiveState", arg0, arg1)
43 ret0, _ := ret[0].(string)
44 ret1, _ := ret[1].(error)
45 return ret0, ret1
46 }
47
48
49 func (mr *MockConnectionMockRecorder) ActiveState(arg0, arg1 interface{}) *gomock.Call {
50 mr.mock.ctrl.T.Helper()
51 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ActiveState", reflect.TypeOf((*MockConnection)(nil).ActiveState), arg0, arg1)
52 }
53
54
55 func (m *MockConnection) Close() {
56 m.ctrl.T.Helper()
57 m.ctrl.Call(m, "Close")
58 }
59
60
61 func (mr *MockConnectionMockRecorder) Close() *gomock.Call {
62 mr.mock.ctrl.T.Helper()
63 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConnection)(nil).Close))
64 }
65
66
67 func (m *MockConnection) Disable(arg0 context.Context, arg1 []string) error {
68 m.ctrl.T.Helper()
69 ret := m.ctrl.Call(m, "Disable", arg0, arg1)
70 ret0, _ := ret[0].(error)
71 return ret0
72 }
73
74
75 func (mr *MockConnectionMockRecorder) Disable(arg0, arg1 interface{}) *gomock.Call {
76 mr.mock.ctrl.T.Helper()
77 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disable", reflect.TypeOf((*MockConnection)(nil).Disable), arg0, arg1)
78 }
79
80
81 func (m *MockConnection) Exists(arg0 context.Context, arg1 string) (bool, error) {
82 m.ctrl.T.Helper()
83 ret := m.ctrl.Call(m, "Exists", arg0, arg1)
84 ret0, _ := ret[0].(bool)
85 ret1, _ := ret[1].(error)
86 return ret0, ret1
87 }
88
89
90 func (mr *MockConnectionMockRecorder) Exists(arg0, arg1 interface{}) *gomock.Call {
91 mr.mock.ctrl.T.Helper()
92 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockConnection)(nil).Exists), arg0, arg1)
93 }
94
95
96 func (m *MockConnection) Restart(arg0 context.Context, arg1 string, arg2 systemd.Mode, arg3 bool) error {
97 m.ctrl.T.Helper()
98 ret := m.ctrl.Call(m, "Restart", arg0, arg1, arg2, arg3)
99 ret0, _ := ret[0].(error)
100 return ret0
101 }
102
103
104 func (mr *MockConnectionMockRecorder) Restart(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
105 mr.mock.ctrl.T.Helper()
106 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Restart", reflect.TypeOf((*MockConnection)(nil).Restart), arg0, arg1, arg2, arg3)
107 }
108
109
110 func (m *MockConnection) Start(arg0 context.Context, arg1 string, arg2 systemd.Mode, arg3 bool) error {
111 m.ctrl.T.Helper()
112 ret := m.ctrl.Call(m, "Start", arg0, arg1, arg2, arg3)
113 ret0, _ := ret[0].(error)
114 return ret0
115 }
116
117
118 func (mr *MockConnectionMockRecorder) Start(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
119 mr.mock.ctrl.T.Helper()
120 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockConnection)(nil).Start), arg0, arg1, arg2, arg3)
121 }
122
123
124 func (m *MockConnection) StartTransient(arg0 context.Context, arg1 string, arg2 systemd.Mode, arg3 []dbus.Property, arg4 bool) error {
125 m.ctrl.T.Helper()
126 ret := m.ctrl.Call(m, "StartTransient", arg0, arg1, arg2, arg3, arg4)
127 ret0, _ := ret[0].(error)
128 return ret0
129 }
130
131
132 func (mr *MockConnectionMockRecorder) StartTransient(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
133 mr.mock.ctrl.T.Helper()
134 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartTransient", reflect.TypeOf((*MockConnection)(nil).StartTransient), arg0, arg1, arg2, arg3, arg4)
135 }
136
137
138 func (m *MockConnection) Stop(arg0 context.Context, arg1 string, arg2 systemd.Mode, arg3 bool) error {
139 m.ctrl.T.Helper()
140 ret := m.ctrl.Call(m, "Stop", arg0, arg1, arg2, arg3)
141 ret0, _ := ret[0].(error)
142 return ret0
143 }
144
145
146 func (mr *MockConnectionMockRecorder) Stop(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
147 mr.mock.ctrl.T.Helper()
148 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockConnection)(nil).Stop), arg0, arg1, arg2, arg3)
149 }
150
151
152 func (m *MockConnection) SubState(arg0 context.Context, arg1 string) (string, error) {
153 m.ctrl.T.Helper()
154 ret := m.ctrl.Call(m, "SubState", arg0, arg1)
155 ret0, _ := ret[0].(string)
156 ret1, _ := ret[1].(error)
157 return ret0, ret1
158 }
159
160
161 func (mr *MockConnectionMockRecorder) SubState(arg0, arg1 interface{}) *gomock.Call {
162 mr.mock.ctrl.T.Helper()
163 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubState", reflect.TypeOf((*MockConnection)(nil).SubState), arg0, arg1)
164 }
165
View as plain text