mock coordinatorclient

This commit is contained in:
Sergey Cherepanov 2023-02-27 17:19:23 +03:00 committed by Mikhail Iudin
parent 2c369a1fe4
commit 04512cee0d
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0
2 changed files with 96 additions and 0 deletions

View File

@ -1,3 +1,4 @@
//go:generate mockgen -destination mock_coordinatorclient/mock_coordinatorclient.go github.com/anytypeio/any-sync/coordinator/coordinatorclient CoordinatorClient
package coordinatorclient package coordinatorclient
import ( import (

View File

@ -0,0 +1,95 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/anytypeio/any-sync/coordinator/coordinatorclient (interfaces: CoordinatorClient)
// Package mock_coordinatorclient is a generated GoMock package.
package mock_coordinatorclient
import (
context "context"
reflect "reflect"
app "github.com/anytypeio/any-sync/app"
coordinatorproto "github.com/anytypeio/any-sync/coordinator/coordinatorproto"
gomock "github.com/golang/mock/gomock"
)
// MockCoordinatorClient is a mock of CoordinatorClient interface.
type MockCoordinatorClient struct {
ctrl *gomock.Controller
recorder *MockCoordinatorClientMockRecorder
}
// MockCoordinatorClientMockRecorder is the mock recorder for MockCoordinatorClient.
type MockCoordinatorClientMockRecorder struct {
mock *MockCoordinatorClient
}
// NewMockCoordinatorClient creates a new mock instance.
func NewMockCoordinatorClient(ctrl *gomock.Controller) *MockCoordinatorClient {
mock := &MockCoordinatorClient{ctrl: ctrl}
mock.recorder = &MockCoordinatorClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCoordinatorClient) EXPECT() *MockCoordinatorClientMockRecorder {
return m.recorder
}
// FileLimitCheck mocks base method.
func (m *MockCoordinatorClient) FileLimitCheck(arg0 context.Context, arg1 string, arg2 []byte) (uint64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FileLimitCheck", arg0, arg1, arg2)
ret0, _ := ret[0].(uint64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FileLimitCheck indicates an expected call of FileLimitCheck.
func (mr *MockCoordinatorClientMockRecorder) FileLimitCheck(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FileLimitCheck", reflect.TypeOf((*MockCoordinatorClient)(nil).FileLimitCheck), arg0, arg1, arg2)
}
// Init mocks base method.
func (m *MockCoordinatorClient) Init(arg0 *app.App) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Init", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Init indicates an expected call of Init.
func (mr *MockCoordinatorClientMockRecorder) Init(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockCoordinatorClient)(nil).Init), arg0)
}
// Name mocks base method.
func (m *MockCoordinatorClient) Name() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Name")
ret0, _ := ret[0].(string)
return ret0
}
// Name indicates an expected call of Name.
func (mr *MockCoordinatorClientMockRecorder) Name() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockCoordinatorClient)(nil).Name))
}
// SpaceSign mocks base method.
func (m *MockCoordinatorClient) SpaceSign(arg0 context.Context, arg1 string) (*coordinatorproto.SpaceReceiptWithSignature, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SpaceSign", arg0, arg1)
ret0, _ := ret[0].(*coordinatorproto.SpaceReceiptWithSignature)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SpaceSign indicates an expected call of SpaceSign.
func (mr *MockCoordinatorClientMockRecorder) SpaceSign(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpaceSign", reflect.TypeOf((*MockCoordinatorClient)(nil).SpaceSign), arg0, arg1)
}