github.com/anycable/anycable-go@v1.5.1/mocks/Identifier.go (about) 1 // Code generated by mockery v2.20.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 common "github.com/anycable/anycable-go/common" 7 8 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // Identifier is an autogenerated mock type for the Identifier type 12 type Identifier struct { 13 mock.Mock 14 } 15 16 // Identify provides a mock function with given fields: sid, env 17 func (_m *Identifier) Identify(sid string, env *common.SessionEnv) (*common.ConnectResult, error) { 18 ret := _m.Called(sid, env) 19 20 var r0 *common.ConnectResult 21 var r1 error 22 if rf, ok := ret.Get(0).(func(string, *common.SessionEnv) (*common.ConnectResult, error)); ok { 23 return rf(sid, env) 24 } 25 if rf, ok := ret.Get(0).(func(string, *common.SessionEnv) *common.ConnectResult); ok { 26 r0 = rf(sid, env) 27 } else { 28 if ret.Get(0) != nil { 29 r0 = ret.Get(0).(*common.ConnectResult) 30 } 31 } 32 33 if rf, ok := ret.Get(1).(func(string, *common.SessionEnv) error); ok { 34 r1 = rf(sid, env) 35 } else { 36 r1 = ret.Error(1) 37 } 38 39 return r0, r1 40 } 41 42 type mockConstructorTestingTNewIdentifier interface { 43 mock.TestingT 44 Cleanup(func()) 45 } 46 47 // NewIdentifier creates a new instance of Identifier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 48 func NewIdentifier(t mockConstructorTestingTNewIdentifier) *Identifier { 49 mock := &Identifier{} 50 mock.Mock.Test(t) 51 52 t.Cleanup(func() { mock.AssertExpectations(t) }) 53 54 return mock 55 }