github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/mock/dkg_state.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 crypto "github.com/onflow/crypto" 7 flow "github.com/onflow/flow-go/model/flow" 8 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // DKGState is an autogenerated mock type for the DKGState type 13 type DKGState struct { 14 mock.Mock 15 } 16 17 // GetDKGEndState provides a mock function with given fields: epochCounter 18 func (_m *DKGState) GetDKGEndState(epochCounter uint64) (flow.DKGEndState, error) { 19 ret := _m.Called(epochCounter) 20 21 var r0 flow.DKGEndState 22 var r1 error 23 if rf, ok := ret.Get(0).(func(uint64) (flow.DKGEndState, error)); ok { 24 return rf(epochCounter) 25 } 26 if rf, ok := ret.Get(0).(func(uint64) flow.DKGEndState); ok { 27 r0 = rf(epochCounter) 28 } else { 29 r0 = ret.Get(0).(flow.DKGEndState) 30 } 31 32 if rf, ok := ret.Get(1).(func(uint64) error); ok { 33 r1 = rf(epochCounter) 34 } else { 35 r1 = ret.Error(1) 36 } 37 38 return r0, r1 39 } 40 41 // GetDKGStarted provides a mock function with given fields: epochCounter 42 func (_m *DKGState) GetDKGStarted(epochCounter uint64) (bool, error) { 43 ret := _m.Called(epochCounter) 44 45 var r0 bool 46 var r1 error 47 if rf, ok := ret.Get(0).(func(uint64) (bool, error)); ok { 48 return rf(epochCounter) 49 } 50 if rf, ok := ret.Get(0).(func(uint64) bool); ok { 51 r0 = rf(epochCounter) 52 } else { 53 r0 = ret.Get(0).(bool) 54 } 55 56 if rf, ok := ret.Get(1).(func(uint64) error); ok { 57 r1 = rf(epochCounter) 58 } else { 59 r1 = ret.Error(1) 60 } 61 62 return r0, r1 63 } 64 65 // InsertMyBeaconPrivateKey provides a mock function with given fields: epochCounter, key 66 func (_m *DKGState) InsertMyBeaconPrivateKey(epochCounter uint64, key crypto.PrivateKey) error { 67 ret := _m.Called(epochCounter, key) 68 69 var r0 error 70 if rf, ok := ret.Get(0).(func(uint64, crypto.PrivateKey) error); ok { 71 r0 = rf(epochCounter, key) 72 } else { 73 r0 = ret.Error(0) 74 } 75 76 return r0 77 } 78 79 // RetrieveMyBeaconPrivateKey provides a mock function with given fields: epochCounter 80 func (_m *DKGState) RetrieveMyBeaconPrivateKey(epochCounter uint64) (crypto.PrivateKey, error) { 81 ret := _m.Called(epochCounter) 82 83 var r0 crypto.PrivateKey 84 var r1 error 85 if rf, ok := ret.Get(0).(func(uint64) (crypto.PrivateKey, error)); ok { 86 return rf(epochCounter) 87 } 88 if rf, ok := ret.Get(0).(func(uint64) crypto.PrivateKey); ok { 89 r0 = rf(epochCounter) 90 } else { 91 if ret.Get(0) != nil { 92 r0 = ret.Get(0).(crypto.PrivateKey) 93 } 94 } 95 96 if rf, ok := ret.Get(1).(func(uint64) error); ok { 97 r1 = rf(epochCounter) 98 } else { 99 r1 = ret.Error(1) 100 } 101 102 return r0, r1 103 } 104 105 // SetDKGEndState provides a mock function with given fields: epochCounter, endState 106 func (_m *DKGState) SetDKGEndState(epochCounter uint64, endState flow.DKGEndState) error { 107 ret := _m.Called(epochCounter, endState) 108 109 var r0 error 110 if rf, ok := ret.Get(0).(func(uint64, flow.DKGEndState) error); ok { 111 r0 = rf(epochCounter, endState) 112 } else { 113 r0 = ret.Error(0) 114 } 115 116 return r0 117 } 118 119 // SetDKGStarted provides a mock function with given fields: epochCounter 120 func (_m *DKGState) SetDKGStarted(epochCounter uint64) error { 121 ret := _m.Called(epochCounter) 122 123 var r0 error 124 if rf, ok := ret.Get(0).(func(uint64) error); ok { 125 r0 = rf(epochCounter) 126 } else { 127 r0 = ret.Error(0) 128 } 129 130 return r0 131 } 132 133 type mockConstructorTestingTNewDKGState interface { 134 mock.TestingT 135 Cleanup(func()) 136 } 137 138 // NewDKGState creates a new instance of DKGState. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 139 func NewDKGState(t mockConstructorTestingTNewDKGState) *DKGState { 140 mock := &DKGState{} 141 mock.Mock.Test(t) 142 143 t.Cleanup(func() { mock.AssertExpectations(t) }) 144 145 return mock 146 }