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

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import common "github.com/anycable/anycable-go/common"
     6  import mock "github.com/stretchr/testify/mock"
     7  
     8  // Controller is an autogenerated mock type for the Controller type
     9  type Controller struct {
    10  	mock.Mock
    11  }
    12  
    13  // Authenticate provides a mock function with given fields: sid, env
    14  func (_m *Controller) Authenticate(sid string, env *common.SessionEnv) (*common.ConnectResult, error) {
    15  	ret := _m.Called(sid, env)
    16  
    17  	var r0 *common.ConnectResult
    18  	if rf, ok := ret.Get(0).(func(string, *common.SessionEnv) *common.ConnectResult); ok {
    19  		r0 = rf(sid, env)
    20  	} else {
    21  		if ret.Get(0) != nil {
    22  			r0 = ret.Get(0).(*common.ConnectResult)
    23  		}
    24  	}
    25  
    26  	var r1 error
    27  	if rf, ok := ret.Get(1).(func(string, *common.SessionEnv) error); ok {
    28  		r1 = rf(sid, env)
    29  	} else {
    30  		r1 = ret.Error(1)
    31  	}
    32  
    33  	return r0, r1
    34  }
    35  
    36  // Disconnect provides a mock function with given fields: sid, env, id, subscriptions
    37  func (_m *Controller) Disconnect(sid string, env *common.SessionEnv, id string, subscriptions []string) error {
    38  	ret := _m.Called(sid, env, id, subscriptions)
    39  
    40  	var r0 error
    41  	if rf, ok := ret.Get(0).(func(string, *common.SessionEnv, string, []string) error); ok {
    42  		r0 = rf(sid, env, id, subscriptions)
    43  	} else {
    44  		r0 = ret.Error(0)
    45  	}
    46  
    47  	return r0
    48  }
    49  
    50  // Perform provides a mock function with given fields: sid, env, id, channel, data
    51  func (_m *Controller) Perform(sid string, env *common.SessionEnv, id string, channel string, data string) (*common.CommandResult, error) {
    52  	ret := _m.Called(sid, env, id, channel, data)
    53  
    54  	var r0 *common.CommandResult
    55  	if rf, ok := ret.Get(0).(func(string, *common.SessionEnv, string, string, string) *common.CommandResult); ok {
    56  		r0 = rf(sid, env, id, channel, data)
    57  	} else {
    58  		if ret.Get(0) != nil {
    59  			r0 = ret.Get(0).(*common.CommandResult)
    60  		}
    61  	}
    62  
    63  	var r1 error
    64  	if rf, ok := ret.Get(1).(func(string, *common.SessionEnv, string, string, string) error); ok {
    65  		r1 = rf(sid, env, id, channel, data)
    66  	} else {
    67  		r1 = ret.Error(1)
    68  	}
    69  
    70  	return r0, r1
    71  }
    72  
    73  // Shutdown provides a mock function with given fields:
    74  func (_m *Controller) Shutdown() error {
    75  	ret := _m.Called()
    76  
    77  	var r0 error
    78  	if rf, ok := ret.Get(0).(func() error); ok {
    79  		r0 = rf()
    80  	} else {
    81  		r0 = ret.Error(0)
    82  	}
    83  
    84  	return r0
    85  }
    86  
    87  // Start provides a mock function with given fields:
    88  func (_m *Controller) Start() error {
    89  	ret := _m.Called()
    90  
    91  	var r0 error
    92  	if rf, ok := ret.Get(0).(func() error); ok {
    93  		r0 = rf()
    94  	} else {
    95  		r0 = ret.Error(0)
    96  	}
    97  
    98  	return r0
    99  }
   100  
   101  // Subscribe provides a mock function with given fields: sid, env, id, channel
   102  func (_m *Controller) Subscribe(sid string, env *common.SessionEnv, id string, channel string) (*common.CommandResult, error) {
   103  	ret := _m.Called(sid, env, id, channel)
   104  
   105  	var r0 *common.CommandResult
   106  	if rf, ok := ret.Get(0).(func(string, *common.SessionEnv, string, string) *common.CommandResult); ok {
   107  		r0 = rf(sid, env, id, channel)
   108  	} else {
   109  		if ret.Get(0) != nil {
   110  			r0 = ret.Get(0).(*common.CommandResult)
   111  		}
   112  	}
   113  
   114  	var r1 error
   115  	if rf, ok := ret.Get(1).(func(string, *common.SessionEnv, string, string) error); ok {
   116  		r1 = rf(sid, env, id, channel)
   117  	} else {
   118  		r1 = ret.Error(1)
   119  	}
   120  
   121  	return r0, r1
   122  }
   123  
   124  // Unsubscribe provides a mock function with given fields: sid, env, id, channel
   125  func (_m *Controller) Unsubscribe(sid string, env *common.SessionEnv, id string, channel string) (*common.CommandResult, error) {
   126  	ret := _m.Called(sid, env, id, channel)
   127  
   128  	var r0 *common.CommandResult
   129  	if rf, ok := ret.Get(0).(func(string, *common.SessionEnv, string, string) *common.CommandResult); ok {
   130  		r0 = rf(sid, env, id, channel)
   131  	} else {
   132  		if ret.Get(0) != nil {
   133  			r0 = ret.Get(0).(*common.CommandResult)
   134  		}
   135  	}
   136  
   137  	var r1 error
   138  	if rf, ok := ret.Get(1).(func(string, *common.SessionEnv, string, string) error); ok {
   139  		r1 = rf(sid, env, id, channel)
   140  	} else {
   141  		r1 = ret.Error(1)
   142  	}
   143  
   144  	return r0, r1
   145  }