storj/pkg/storage/ec/transportclient_mock_test.go
Natalie Villasana d82486b85b
adds SegmentStore Put functionality (#138)
* lays out SegmentStore functions to implement

* Merge branch 'master' into segment-store

* adds overlay calls to put

* allows SegmentStore Put to upload a file to ecclient, then save pointer to pointerdb

* Merge branch 'master' into segment-store

* removes new overlay client instance in Put

* fixes syntax

* fixes syntax again

* fixes imports

* fixes typo

* removes pointerdb client from segmentStore struct for now

* changes SegmentStore to segmentStore

* changing types in parameters to fit other function calls

* takes RedundancyStrategy out of Put params

* changes NewClient param back to take an interface (not pointer to interface)

* fixes types

* moves pointer into PutRequest in SegmentStore Put

* passes interfact, not pointer to interface to NewSegmentStore

* fixes some types

* Get returns an instance of Meta

* fixes PutRequest fields

* adds remotePieces slice to pointerdb PutRequest

* ecClient Put now takes *proto.Nodes instead of proto.Nodes

* fixes syntax

* changes ec client dial interface to use *proto.Node

* changes other instances of proto.Node to *proto.Node in ecclient pkg

* adds *proto.Node to Get and Delete functions in ecclient pkg

* changes proto.Node to pointer in ec client_test

* changes proto.Node to pointer in ec client_test

* adds ecclient and pointerdb client to the segmentstore constructor

* adds ecclient and pointerDBClient to segmentStore constructor
2018-07-12 18:37:50 -04:00

67 lines
2.1 KiB
Go

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
// Code generated by MockGen. DO NOT EDIT.
// Source: storj.io/storj/pkg/transport (interfaces: Client)
// Package ecclient is a generated GoMock package.
package ecclient
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
grpc "google.golang.org/grpc"
overlay "storj.io/storj/protos/overlay"
)
// 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
}
// DialNode mocks base method
func (m *MockClient) DialNode(arg0 context.Context, arg1 *overlay.Node) (*grpc.ClientConn, error) {
ret := m.ctrl.Call(m, "DialNode", arg0, arg1)
ret0, _ := ret[0].(*grpc.ClientConn)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DialNode indicates an expected call of DialNode
func (mr *MockClientMockRecorder) DialNode(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DialNode", reflect.TypeOf((*MockClient)(nil).DialNode), arg0, arg1)
}
// DialUnauthenticated mocks base method
func (m *MockClient) DialUnauthenticated(arg0 context.Context, arg1 overlay.NodeAddress) (*grpc.ClientConn, error) {
ret := m.ctrl.Call(m, "DialUnauthenticated", arg0, arg1)
ret0, _ := ret[0].(*grpc.ClientConn)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DialUnauthenticated indicates an expected call of DialUnauthenticated
func (mr *MockClientMockRecorder) DialUnauthenticated(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DialUnauthenticated", reflect.TypeOf((*MockClient)(nil).DialUnauthenticated), arg0, arg1)
}