/
unitstate.go
138 lines (117 loc) · 4.69 KB
/
unitstate.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/juju/juju/apiserver/common (interfaces: UnitStateBackend,UnitStateUnit)
//
// Generated by this command:
//
// mockgen -package mocks -destination mocks/unitstate.go github.com/juju/juju/apiserver/common UnitStateBackend,UnitStateUnit
//
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
common "github.com/juju/juju/apiserver/common"
controller "github.com/juju/juju/controller"
state "github.com/juju/juju/state"
gomock "go.uber.org/mock/gomock"
)
// MockUnitStateBackend is a mock of UnitStateBackend interface.
type MockUnitStateBackend struct {
ctrl *gomock.Controller
recorder *MockUnitStateBackendMockRecorder
}
// MockUnitStateBackendMockRecorder is the mock recorder for MockUnitStateBackend.
type MockUnitStateBackendMockRecorder struct {
mock *MockUnitStateBackend
}
// NewMockUnitStateBackend creates a new mock instance.
func NewMockUnitStateBackend(ctrl *gomock.Controller) *MockUnitStateBackend {
mock := &MockUnitStateBackend{ctrl: ctrl}
mock.recorder = &MockUnitStateBackendMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUnitStateBackend) EXPECT() *MockUnitStateBackendMockRecorder {
return m.recorder
}
// ApplyOperation mocks base method.
func (m *MockUnitStateBackend) ApplyOperation(arg0 state.ModelOperation) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ApplyOperation", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// ApplyOperation indicates an expected call of ApplyOperation.
func (mr *MockUnitStateBackendMockRecorder) ApplyOperation(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyOperation", reflect.TypeOf((*MockUnitStateBackend)(nil).ApplyOperation), arg0)
}
// ControllerConfig mocks base method.
func (m *MockUnitStateBackend) ControllerConfig() (controller.Config, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ControllerConfig")
ret0, _ := ret[0].(controller.Config)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ControllerConfig indicates an expected call of ControllerConfig.
func (mr *MockUnitStateBackendMockRecorder) ControllerConfig() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerConfig", reflect.TypeOf((*MockUnitStateBackend)(nil).ControllerConfig))
}
// Unit mocks base method.
func (m *MockUnitStateBackend) Unit(arg0 string) (common.UnitStateUnit, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Unit", arg0)
ret0, _ := ret[0].(common.UnitStateUnit)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Unit indicates an expected call of Unit.
func (mr *MockUnitStateBackendMockRecorder) Unit(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unit", reflect.TypeOf((*MockUnitStateBackend)(nil).Unit), arg0)
}
// MockUnitStateUnit is a mock of UnitStateUnit interface.
type MockUnitStateUnit struct {
ctrl *gomock.Controller
recorder *MockUnitStateUnitMockRecorder
}
// MockUnitStateUnitMockRecorder is the mock recorder for MockUnitStateUnit.
type MockUnitStateUnitMockRecorder struct {
mock *MockUnitStateUnit
}
// NewMockUnitStateUnit creates a new mock instance.
func NewMockUnitStateUnit(ctrl *gomock.Controller) *MockUnitStateUnit {
mock := &MockUnitStateUnit{ctrl: ctrl}
mock.recorder = &MockUnitStateUnitMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUnitStateUnit) EXPECT() *MockUnitStateUnitMockRecorder {
return m.recorder
}
// SetStateOperation mocks base method.
func (m *MockUnitStateUnit) SetStateOperation(arg0 *state.UnitState, arg1 state.UnitStateSizeLimits) state.ModelOperation {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetStateOperation", arg0, arg1)
ret0, _ := ret[0].(state.ModelOperation)
return ret0
}
// SetStateOperation indicates an expected call of SetStateOperation.
func (mr *MockUnitStateUnitMockRecorder) SetStateOperation(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStateOperation", reflect.TypeOf((*MockUnitStateUnit)(nil).SetStateOperation), arg0, arg1)
}
// State mocks base method.
func (m *MockUnitStateUnit) State() (*state.UnitState, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "State")
ret0, _ := ret[0].(*state.UnitState)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// State indicates an expected call of State.
func (mr *MockUnitStateUnitMockRecorder) State() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockUnitStateUnit)(nil).State))
}