Documentation ¶
Overview ¶
Package service is a generated GoMock package.
Index ¶
- Variables
- type MockService
- func (m *MockService) EXPECT() *MockServiceMockRecorder
- func (m *MockService) GetPDVMeta(ctx context.Context, owner string, id uint64) (api.PDVMeta, error)
- func (m *MockService) ListPDV(ctx context.Context, owner string, from uint64, limit uint16) ([]uint64, error)
- func (m *MockService) ReceivePDV(ctx context.Context, owner string, id uint64) ([]byte, error)
- func (m *MockService) SavePDV(ctx context.Context, p schema.PDV, owner types.AccAddress) (uint64, api.PDVMeta, error)
- type MockServiceMockRecorder
- func (mr *MockServiceMockRecorder) GetPDVMeta(ctx, owner, id interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) ListPDV(ctx, owner, from, limit interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) ReceivePDV(ctx, owner, id interface{}) *gomock.Call
- func (mr *MockServiceMockRecorder) SavePDV(ctx, p, owner interface{}) *gomock.Call
- type RewardMap
- type Service
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("not found")
ErrNotFound means that requested object is not found.
Functions ¶
This section is empty.
Types ¶
type MockService ¶
type MockService struct {
// contains filtered or unexported fields
}
MockService is a mock of Service interface
func NewMockService ¶
func NewMockService(ctrl *gomock.Controller) *MockService
NewMockService creates a new mock instance
func (*MockService) EXPECT ¶
func (m *MockService) EXPECT() *MockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockService) GetPDVMeta ¶ added in v0.2.4
GetPDVMeta mocks base method
func (*MockService) ListPDV ¶ added in v0.2.4
func (m *MockService) ListPDV(ctx context.Context, owner string, from uint64, limit uint16) ([]uint64, error)
ListPDV mocks base method
func (*MockService) ReceivePDV ¶
ReceivePDV mocks base method
type MockServiceMockRecorder ¶
type MockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceMockRecorder is the mock recorder for MockService
func (*MockServiceMockRecorder) GetPDVMeta ¶ added in v0.2.4
func (mr *MockServiceMockRecorder) GetPDVMeta(ctx, owner, id interface{}) *gomock.Call
GetPDVMeta indicates an expected call of GetPDVMeta
func (*MockServiceMockRecorder) ListPDV ¶ added in v0.2.4
func (mr *MockServiceMockRecorder) ListPDV(ctx, owner, from, limit interface{}) *gomock.Call
ListPDV indicates an expected call of ListPDV
func (*MockServiceMockRecorder) ReceivePDV ¶
func (mr *MockServiceMockRecorder) ReceivePDV(ctx, owner, id interface{}) *gomock.Call
ReceivePDV indicates an expected call of ReceivePDV
func (*MockServiceMockRecorder) SavePDV ¶
func (mr *MockServiceMockRecorder) SavePDV(ctx, p, owner interface{}) *gomock.Call
SavePDV indicates an expected call of SavePDV
type Service ¶
type Service interface { // SavePDV sends PDV to storage. SavePDV(ctx context.Context, p schema.PDV, owner sdk.AccAddress) (uint64, api.PDVMeta, error) // ListPDV lists PDVs. ListPDV(ctx context.Context, owner string, from uint64, limit uint16) ([]uint64, error) // ReceivePDV returns slice of bytes of PDV requested by address from storage. ReceivePDV(ctx context.Context, owner string, id uint64) ([]byte, error) // GetPDVMeta returns PDVs meta. GetPDVMeta(ctx context.Context, owner string, id uint64) (api.PDVMeta, error) }
Service interface provides service's logic's methods.
func New ¶
func New(c crypto.Crypto, s storage.Storage, b blockchain.Blockchain, rewardMap RewardMap) Service
New returns new instance of service.