113 lines
3.8 KiB
Go
113 lines
3.8 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: client.go
|
|
|
|
// Package mocks is a generated GoMock package.
|
|
package mocks
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
cdnsystem "d7y.io/api/v2/pkg/apis/cdnsystem/v1"
|
|
common "d7y.io/api/v2/pkg/apis/common/v1"
|
|
gomock "github.com/golang/mock/gomock"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// MockClient is a mock of Client interface.
|
|
type MockClient struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockClientMockRecorder
|
|
}
|
|
|
|
// MockClientMockRecorder is the mock recorder for MockClient.
|
|
type MockClientMockRecorder struct {
|
|
mock *MockClient
|
|
}
|
|
|
|
// NewMockClient creates a new mock instance.
|
|
func NewMockClient(ctrl *gomock.Controller) *MockClient {
|
|
mock := &MockClient{ctrl: ctrl}
|
|
mock.recorder = &MockClientMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockClient) EXPECT() *MockClientMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Close mocks base method.
|
|
func (m *MockClient) Close() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Close")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Close indicates an expected call of Close.
|
|
func (mr *MockClientMockRecorder) Close() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockClient)(nil).Close))
|
|
}
|
|
|
|
// GetPieceTasks mocks base method.
|
|
func (m *MockClient) GetPieceTasks(arg0 context.Context, arg1 *common.PieceTaskRequest, arg2 ...grpc.CallOption) (*common.PiecePacket, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "GetPieceTasks", varargs...)
|
|
ret0, _ := ret[0].(*common.PiecePacket)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetPieceTasks indicates an expected call of GetPieceTasks.
|
|
func (mr *MockClientMockRecorder) GetPieceTasks(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPieceTasks", reflect.TypeOf((*MockClient)(nil).GetPieceTasks), varargs...)
|
|
}
|
|
|
|
// ObtainSeeds mocks base method.
|
|
func (m *MockClient) ObtainSeeds(arg0 context.Context, arg1 *cdnsystem.SeedRequest, arg2 ...grpc.CallOption) (cdnsystem.Seeder_ObtainSeedsClient, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "ObtainSeeds", varargs...)
|
|
ret0, _ := ret[0].(cdnsystem.Seeder_ObtainSeedsClient)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// ObtainSeeds indicates an expected call of ObtainSeeds.
|
|
func (mr *MockClientMockRecorder) ObtainSeeds(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObtainSeeds", reflect.TypeOf((*MockClient)(nil).ObtainSeeds), varargs...)
|
|
}
|
|
|
|
// SyncPieceTasks mocks base method.
|
|
func (m *MockClient) SyncPieceTasks(arg0 context.Context, arg1 *common.PieceTaskRequest, arg2 ...grpc.CallOption) (cdnsystem.Seeder_SyncPieceTasksClient, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "SyncPieceTasks", varargs...)
|
|
ret0, _ := ret[0].(cdnsystem.Seeder_SyncPieceTasksClient)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// SyncPieceTasks indicates an expected call of SyncPieceTasks.
|
|
func (mr *MockClientMockRecorder) SyncPieceTasks(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPieceTasks", reflect.TypeOf((*MockClient)(nil).SyncPieceTasks), varargs...)
|
|
}
|