c3d3f41d30
Removes most instances of pb.SignedMessage (there's more to take out but they shouldn't hurt anyone as is). There used to be places in psserver where a PieceID was hmac'd with the SatelliteID, which was gotten from a SignedMessage. This PR makes it so some functions access the SatelliteID from the Payer Bandwidth Allocation instead. This requires passing a SatelliteID into psserver functions where they weren't before, so the following proto messages have been changed: * PieceId - satellite_id field added This is so the psserver.Piece function has access to the SatelliteID when it needs to get the namespaced pieceID. This proto message should probably be renamed to PieceRequest, or a new PieceRequest message should be created so this isn't misnamed. * PieceDelete - satellite_id field added This is so the psserver.Delete function has access to the SatelliteID when receiving a request to Delete.
111 lines
3.6 KiB
Go
111 lines
3.6 KiB
Go
// 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"
|
|
gomock "github.com/golang/mock/gomock"
|
|
grpc "google.golang.org/grpc"
|
|
reflect "reflect"
|
|
identity "storj.io/storj/pkg/identity"
|
|
pb "storj.io/storj/pkg/pb"
|
|
transport "storj.io/storj/pkg/transport"
|
|
)
|
|
|
|
// 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
|
|
}
|
|
|
|
// DialAddress mocks base method
|
|
func (m *MockClient) DialAddress(arg0 context.Context, arg1 string, arg2 ...grpc.DialOption) (*grpc.ClientConn, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "DialAddress", varargs...)
|
|
ret0, _ := ret[0].(*grpc.ClientConn)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// DialAddress indicates an expected call of DialAddress
|
|
func (mr *MockClientMockRecorder) DialAddress(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, "DialAddress", reflect.TypeOf((*MockClient)(nil).DialAddress), varargs...)
|
|
}
|
|
|
|
// DialNode mocks base method
|
|
func (m *MockClient) DialNode(arg0 context.Context, arg1 *pb.Node, arg2 ...grpc.DialOption) (*grpc.ClientConn, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{arg0, arg1}
|
|
for _, a := range arg2 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "DialNode", varargs...)
|
|
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{}, arg2 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DialNode", reflect.TypeOf((*MockClient)(nil).DialNode), varargs...)
|
|
}
|
|
|
|
// Identity mocks base method
|
|
func (m *MockClient) Identity() *identity.FullIdentity {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Identity")
|
|
ret0, _ := ret[0].(*identity.FullIdentity)
|
|
return ret0
|
|
}
|
|
|
|
// Identity indicates an expected call of Identity
|
|
func (mr *MockClientMockRecorder) Identity() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Identity", reflect.TypeOf((*MockClient)(nil).Identity))
|
|
}
|
|
|
|
// WithObservers mocks base method
|
|
func (m *MockClient) WithObservers(arg0 ...transport.Observer) *transport.Transport {
|
|
m.ctrl.T.Helper()
|
|
varargs := []interface{}{}
|
|
for _, a := range arg0 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "WithObservers", varargs...)
|
|
ret0, _ := ret[0].(*transport.Transport)
|
|
return ret0
|
|
}
|
|
|
|
// WithObservers indicates an expected call of WithObservers
|
|
func (mr *MockClientMockRecorder) WithObservers(arg0 ...interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithObservers", reflect.TypeOf((*MockClient)(nil).WithObservers), arg0...)
|
|
}
|