github.com/anycable/anycable-go@v1.5.1/mocks/RPCServer.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import anycable "github.com/anycable/anycable-go/protos"
     6  import context "context"
     7  import mock "github.com/stretchr/testify/mock"
     8  
     9  // RPCServer is an autogenerated mock type for the RPCServer type
    10  type RPCServer struct {
    11  	mock.Mock
    12  }
    13  
    14  // Command provides a mock function with given fields: _a0, _a1
    15  func (_m *RPCServer) Command(_a0 context.Context, _a1 *anycable.CommandMessage) (*anycable.CommandResponse, error) {
    16  	ret := _m.Called(_a0, _a1)
    17  
    18  	var r0 *anycable.CommandResponse
    19  	if rf, ok := ret.Get(0).(func(context.Context, *anycable.CommandMessage) *anycable.CommandResponse); ok {
    20  		r0 = rf(_a0, _a1)
    21  	} else {
    22  		if ret.Get(0) != nil {
    23  			r0 = ret.Get(0).(*anycable.CommandResponse)
    24  		}
    25  	}
    26  
    27  	var r1 error
    28  	if rf, ok := ret.Get(1).(func(context.Context, *anycable.CommandMessage) error); ok {
    29  		r1 = rf(_a0, _a1)
    30  	} else {
    31  		r1 = ret.Error(1)
    32  	}
    33  
    34  	return r0, r1
    35  }
    36  
    37  // Connect provides a mock function with given fields: _a0, _a1
    38  func (_m *RPCServer) Connect(_a0 context.Context, _a1 *anycable.ConnectionRequest) (*anycable.ConnectionResponse, error) {
    39  	ret := _m.Called(_a0, _a1)
    40  
    41  	var r0 *anycable.ConnectionResponse
    42  	if rf, ok := ret.Get(0).(func(context.Context, *anycable.ConnectionRequest) *anycable.ConnectionResponse); ok {
    43  		r0 = rf(_a0, _a1)
    44  	} else {
    45  		if ret.Get(0) != nil {
    46  			r0 = ret.Get(0).(*anycable.ConnectionResponse)
    47  		}
    48  	}
    49  
    50  	var r1 error
    51  	if rf, ok := ret.Get(1).(func(context.Context, *anycable.ConnectionRequest) error); ok {
    52  		r1 = rf(_a0, _a1)
    53  	} else {
    54  		r1 = ret.Error(1)
    55  	}
    56  
    57  	return r0, r1
    58  }
    59  
    60  // Disconnect provides a mock function with given fields: _a0, _a1
    61  func (_m *RPCServer) Disconnect(_a0 context.Context, _a1 *anycable.DisconnectRequest) (*anycable.DisconnectResponse, error) {
    62  	ret := _m.Called(_a0, _a1)
    63  
    64  	var r0 *anycable.DisconnectResponse
    65  	if rf, ok := ret.Get(0).(func(context.Context, *anycable.DisconnectRequest) *anycable.DisconnectResponse); ok {
    66  		r0 = rf(_a0, _a1)
    67  	} else {
    68  		if ret.Get(0) != nil {
    69  			r0 = ret.Get(0).(*anycable.DisconnectResponse)
    70  		}
    71  	}
    72  
    73  	var r1 error
    74  	if rf, ok := ret.Get(1).(func(context.Context, *anycable.DisconnectRequest) error); ok {
    75  		r1 = rf(_a0, _a1)
    76  	} else {
    77  		r1 = ret.Error(1)
    78  	}
    79  
    80  	return r0, r1
    81  }