-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
pf.go
99 lines (82 loc) · 3.67 KB
/
pf.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/filecoin-project/lotus/storage/paths (interfaces: PartialFileHandler)
// Package mocks is a generated GoMock package.
package mocks
import (
io "io"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
abi "github.com/filecoin-project/go-state-types/abi"
partialfile "github.com/filecoin-project/lotus/storage/sealer/partialfile"
storiface "github.com/filecoin-project/lotus/storage/sealer/storiface"
)
// MockPartialFileHandler is a mock of PartialFileHandler interface.
type MockPartialFileHandler struct {
ctrl *gomock.Controller
recorder *MockPartialFileHandlerMockRecorder
}
// MockPartialFileHandlerMockRecorder is the mock recorder for MockPartialFileHandler.
type MockPartialFileHandlerMockRecorder struct {
mock *MockPartialFileHandler
}
// NewMockPartialFileHandler creates a new mock instance.
func NewMockPartialFileHandler(ctrl *gomock.Controller) *MockPartialFileHandler {
mock := &MockPartialFileHandler{ctrl: ctrl}
mock.recorder = &MockPartialFileHandlerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPartialFileHandler) EXPECT() *MockPartialFileHandlerMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockPartialFileHandler) Close(arg0 *partialfile.PartialFile) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close.
func (mr *MockPartialFileHandlerMockRecorder) Close(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPartialFileHandler)(nil).Close), arg0)
}
// HasAllocated mocks base method.
func (m *MockPartialFileHandler) HasAllocated(arg0 *partialfile.PartialFile, arg1 storiface.UnpaddedByteIndex, arg2 abi.UnpaddedPieceSize) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HasAllocated", arg0, arg1, arg2)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// HasAllocated indicates an expected call of HasAllocated.
func (mr *MockPartialFileHandlerMockRecorder) HasAllocated(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasAllocated", reflect.TypeOf((*MockPartialFileHandler)(nil).HasAllocated), arg0, arg1, arg2)
}
// OpenPartialFile mocks base method.
func (m *MockPartialFileHandler) OpenPartialFile(arg0 abi.PaddedPieceSize, arg1 string) (*partialfile.PartialFile, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OpenPartialFile", arg0, arg1)
ret0, _ := ret[0].(*partialfile.PartialFile)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// OpenPartialFile indicates an expected call of OpenPartialFile.
func (mr *MockPartialFileHandlerMockRecorder) OpenPartialFile(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenPartialFile", reflect.TypeOf((*MockPartialFileHandler)(nil).OpenPartialFile), arg0, arg1)
}
// Reader mocks base method.
func (m *MockPartialFileHandler) Reader(arg0 *partialfile.PartialFile, arg1 storiface.PaddedByteIndex, arg2 abi.PaddedPieceSize) (io.Reader, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Reader", arg0, arg1, arg2)
ret0, _ := ret[0].(io.Reader)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Reader indicates an expected call of Reader.
func (mr *MockPartialFileHandlerMockRecorder) Reader(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reader", reflect.TypeOf((*MockPartialFileHandler)(nil).Reader), arg0, arg1, arg2)
}