// Code generated by counterfeiter. DO NOT EDIT. package proxyfakes import ( "context" "net/http" "srsx/internal/proxy" "sync" ) type FakeWebRTCProxyServer struct { CloseStub func() error closeMutex sync.RWMutex closeArgsForCall []struct { } closeReturns struct { result1 error } closeReturnsOnCall map[int]struct { result1 error } HandleApiForWHEPStub func(context.Context, http.ResponseWriter, *http.Request) error handleApiForWHEPMutex sync.RWMutex handleApiForWHEPArgsForCall []struct { arg1 context.Context arg2 http.ResponseWriter arg3 *http.Request } handleApiForWHEPReturns struct { result1 error } handleApiForWHEPReturnsOnCall map[int]struct { result1 error } HandleApiForWHIPStub func(context.Context, http.ResponseWriter, *http.Request) error handleApiForWHIPMutex sync.RWMutex handleApiForWHIPArgsForCall []struct { arg1 context.Context arg2 http.ResponseWriter arg3 *http.Request } handleApiForWHIPReturns struct { result1 error } handleApiForWHIPReturnsOnCall map[int]struct { result1 error } RunStub func(context.Context) error runMutex sync.RWMutex runArgsForCall []struct { arg1 context.Context } runReturns struct { result1 error } runReturnsOnCall map[int]struct { result1 error } invocations map[string][][]interface{} invocationsMutex sync.RWMutex } func (fake *FakeWebRTCProxyServer) Close() error { fake.closeMutex.Lock() ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] fake.closeArgsForCall = append(fake.closeArgsForCall, struct { }{}) stub := fake.CloseStub fakeReturns := fake.closeReturns fake.recordInvocation("Close", []interface{}{}) fake.closeMutex.Unlock() if stub != nil { return stub() } if specificReturn { return ret.result1 } return fakeReturns.result1 } func (fake *FakeWebRTCProxyServer) CloseCallCount() int { fake.closeMutex.RLock() defer fake.closeMutex.RUnlock() return len(fake.closeArgsForCall) } func (fake *FakeWebRTCProxyServer) CloseCalls(stub func() error) { fake.closeMutex.Lock() defer fake.closeMutex.Unlock() fake.CloseStub = stub } func (fake *FakeWebRTCProxyServer) CloseReturns(result1 error) { fake.closeMutex.Lock() defer fake.closeMutex.Unlock() fake.CloseStub = nil fake.closeReturns = struct { result1 error }{result1} } func (fake *FakeWebRTCProxyServer) CloseReturnsOnCall(i int, result1 error) { fake.closeMutex.Lock() defer fake.closeMutex.Unlock() fake.CloseStub = nil if fake.closeReturnsOnCall == nil { fake.closeReturnsOnCall = make(map[int]struct { result1 error }) } fake.closeReturnsOnCall[i] = struct { result1 error }{result1} } func (fake *FakeWebRTCProxyServer) HandleApiForWHEP(arg1 context.Context, arg2 http.ResponseWriter, arg3 *http.Request) error { fake.handleApiForWHEPMutex.Lock() ret, specificReturn := fake.handleApiForWHEPReturnsOnCall[len(fake.handleApiForWHEPArgsForCall)] fake.handleApiForWHEPArgsForCall = append(fake.handleApiForWHEPArgsForCall, struct { arg1 context.Context arg2 http.ResponseWriter arg3 *http.Request }{arg1, arg2, arg3}) stub := fake.HandleApiForWHEPStub fakeReturns := fake.handleApiForWHEPReturns fake.recordInvocation("HandleApiForWHEP", []interface{}{arg1, arg2, arg3}) fake.handleApiForWHEPMutex.Unlock() if stub != nil { return stub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } return fakeReturns.result1 } func (fake *FakeWebRTCProxyServer) HandleApiForWHEPCallCount() int { fake.handleApiForWHEPMutex.RLock() defer fake.handleApiForWHEPMutex.RUnlock() return len(fake.handleApiForWHEPArgsForCall) } func (fake *FakeWebRTCProxyServer) HandleApiForWHEPCalls(stub func(context.Context, http.ResponseWriter, *http.Request) error) { fake.handleApiForWHEPMutex.Lock() defer fake.handleApiForWHEPMutex.Unlock() fake.HandleApiForWHEPStub = stub } func (fake *FakeWebRTCProxyServer) HandleApiForWHEPArgsForCall(i int) (context.Context, http.ResponseWriter, *http.Request) { fake.handleApiForWHEPMutex.RLock() defer fake.handleApiForWHEPMutex.RUnlock() argsForCall := fake.handleApiForWHEPArgsForCall[i] return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 } func (fake *FakeWebRTCProxyServer) HandleApiForWHEPReturns(result1 error) { fake.handleApiForWHEPMutex.Lock() defer fake.handleApiForWHEPMutex.Unlock() fake.HandleApiForWHEPStub = nil fake.handleApiForWHEPReturns = struct { result1 error }{result1} } func (fake *FakeWebRTCProxyServer) HandleApiForWHEPReturnsOnCall(i int, result1 error) { fake.handleApiForWHEPMutex.Lock() defer fake.handleApiForWHEPMutex.Unlock() fake.HandleApiForWHEPStub = nil if fake.handleApiForWHEPReturnsOnCall == nil { fake.handleApiForWHEPReturnsOnCall = make(map[int]struct { result1 error }) } fake.handleApiForWHEPReturnsOnCall[i] = struct { result1 error }{result1} } func (fake *FakeWebRTCProxyServer) HandleApiForWHIP(arg1 context.Context, arg2 http.ResponseWriter, arg3 *http.Request) error { fake.handleApiForWHIPMutex.Lock() ret, specificReturn := fake.handleApiForWHIPReturnsOnCall[len(fake.handleApiForWHIPArgsForCall)] fake.handleApiForWHIPArgsForCall = append(fake.handleApiForWHIPArgsForCall, struct { arg1 context.Context arg2 http.ResponseWriter arg3 *http.Request }{arg1, arg2, arg3}) stub := fake.HandleApiForWHIPStub fakeReturns := fake.handleApiForWHIPReturns fake.recordInvocation("HandleApiForWHIP", []interface{}{arg1, arg2, arg3}) fake.handleApiForWHIPMutex.Unlock() if stub != nil { return stub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } return fakeReturns.result1 } func (fake *FakeWebRTCProxyServer) HandleApiForWHIPCallCount() int { fake.handleApiForWHIPMutex.RLock() defer fake.handleApiForWHIPMutex.RUnlock() return len(fake.handleApiForWHIPArgsForCall) } func (fake *FakeWebRTCProxyServer) HandleApiForWHIPCalls(stub func(context.Context, http.ResponseWriter, *http.Request) error) { fake.handleApiForWHIPMutex.Lock() defer fake.handleApiForWHIPMutex.Unlock() fake.HandleApiForWHIPStub = stub } func (fake *FakeWebRTCProxyServer) HandleApiForWHIPArgsForCall(i int) (context.Context, http.ResponseWriter, *http.Request) { fake.handleApiForWHIPMutex.RLock() defer fake.handleApiForWHIPMutex.RUnlock() argsForCall := fake.handleApiForWHIPArgsForCall[i] return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 } func (fake *FakeWebRTCProxyServer) HandleApiForWHIPReturns(result1 error) { fake.handleApiForWHIPMutex.Lock() defer fake.handleApiForWHIPMutex.Unlock() fake.HandleApiForWHIPStub = nil fake.handleApiForWHIPReturns = struct { result1 error }{result1} } func (fake *FakeWebRTCProxyServer) HandleApiForWHIPReturnsOnCall(i int, result1 error) { fake.handleApiForWHIPMutex.Lock() defer fake.handleApiForWHIPMutex.Unlock() fake.HandleApiForWHIPStub = nil if fake.handleApiForWHIPReturnsOnCall == nil { fake.handleApiForWHIPReturnsOnCall = make(map[int]struct { result1 error }) } fake.handleApiForWHIPReturnsOnCall[i] = struct { result1 error }{result1} } func (fake *FakeWebRTCProxyServer) Run(arg1 context.Context) error { fake.runMutex.Lock() ret, specificReturn := fake.runReturnsOnCall[len(fake.runArgsForCall)] fake.runArgsForCall = append(fake.runArgsForCall, struct { arg1 context.Context }{arg1}) stub := fake.RunStub fakeReturns := fake.runReturns fake.recordInvocation("Run", []interface{}{arg1}) fake.runMutex.Unlock() if stub != nil { return stub(arg1) } if specificReturn { return ret.result1 } return fakeReturns.result1 } func (fake *FakeWebRTCProxyServer) RunCallCount() int { fake.runMutex.RLock() defer fake.runMutex.RUnlock() return len(fake.runArgsForCall) } func (fake *FakeWebRTCProxyServer) RunCalls(stub func(context.Context) error) { fake.runMutex.Lock() defer fake.runMutex.Unlock() fake.RunStub = stub } func (fake *FakeWebRTCProxyServer) RunArgsForCall(i int) context.Context { fake.runMutex.RLock() defer fake.runMutex.RUnlock() argsForCall := fake.runArgsForCall[i] return argsForCall.arg1 } func (fake *FakeWebRTCProxyServer) RunReturns(result1 error) { fake.runMutex.Lock() defer fake.runMutex.Unlock() fake.RunStub = nil fake.runReturns = struct { result1 error }{result1} } func (fake *FakeWebRTCProxyServer) RunReturnsOnCall(i int, result1 error) { fake.runMutex.Lock() defer fake.runMutex.Unlock() fake.RunStub = nil if fake.runReturnsOnCall == nil { fake.runReturnsOnCall = make(map[int]struct { result1 error }) } fake.runReturnsOnCall[i] = struct { result1 error }{result1} } func (fake *FakeWebRTCProxyServer) Invocations() map[string][][]interface{} { fake.invocationsMutex.RLock() defer fake.invocationsMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} for key, value := range fake.invocations { copiedInvocations[key] = value } return copiedInvocations } func (fake *FakeWebRTCProxyServer) recordInvocation(key string, args []interface{}) { fake.invocationsMutex.Lock() defer fake.invocationsMutex.Unlock() if fake.invocations == nil { fake.invocations = map[string][][]interface{}{} } if fake.invocations[key] == nil { fake.invocations[key] = [][]interface{}{} } fake.invocations[key] = append(fake.invocations[key], args) } var _ proxy.WebRTCProxyServer = new(FakeWebRTCProxyServer)