move delete to oss service store (#4164)

This commit is contained in:
Paul Wells
2025-12-16 22:00:43 -08:00
committed by GitHub
parent 5964efbba5
commit 3e41725395
4 changed files with 86 additions and 76 deletions
@@ -36,6 +36,21 @@ type FakeObjectStore struct {
deleteRoomReturnsOnCall map[int]struct {
result1 error
}
HasParticipantStub func(context.Context, livekit.RoomName, livekit.ParticipantIdentity) (bool, error)
hasParticipantMutex sync.RWMutex
hasParticipantArgsForCall []struct {
arg1 context.Context
arg2 livekit.RoomName
arg3 livekit.ParticipantIdentity
}
hasParticipantReturns struct {
result1 bool
result2 error
}
hasParticipantReturnsOnCall map[int]struct {
result1 bool
result2 error
}
ListParticipantsStub func(context.Context, livekit.RoomName) ([]*livekit.ParticipantInfo, error)
listParticipantsMutex sync.RWMutex
listParticipantsArgsForCall []struct {
@@ -279,6 +294,72 @@ func (fake *FakeObjectStore) DeleteRoomReturnsOnCall(i int, result1 error) {
}{result1}
}
func (fake *FakeObjectStore) HasParticipant(arg1 context.Context, arg2 livekit.RoomName, arg3 livekit.ParticipantIdentity) (bool, error) {
fake.hasParticipantMutex.Lock()
ret, specificReturn := fake.hasParticipantReturnsOnCall[len(fake.hasParticipantArgsForCall)]
fake.hasParticipantArgsForCall = append(fake.hasParticipantArgsForCall, struct {
arg1 context.Context
arg2 livekit.RoomName
arg3 livekit.ParticipantIdentity
}{arg1, arg2, arg3})
stub := fake.HasParticipantStub
fakeReturns := fake.hasParticipantReturns
fake.recordInvocation("HasParticipant", []interface{}{arg1, arg2, arg3})
fake.hasParticipantMutex.Unlock()
if stub != nil {
return stub(arg1, arg2, arg3)
}
if specificReturn {
return ret.result1, ret.result2
}
return fakeReturns.result1, fakeReturns.result2
}
func (fake *FakeObjectStore) HasParticipantCallCount() int {
fake.hasParticipantMutex.RLock()
defer fake.hasParticipantMutex.RUnlock()
return len(fake.hasParticipantArgsForCall)
}
func (fake *FakeObjectStore) HasParticipantCalls(stub func(context.Context, livekit.RoomName, livekit.ParticipantIdentity) (bool, error)) {
fake.hasParticipantMutex.Lock()
defer fake.hasParticipantMutex.Unlock()
fake.HasParticipantStub = stub
}
func (fake *FakeObjectStore) HasParticipantArgsForCall(i int) (context.Context, livekit.RoomName, livekit.ParticipantIdentity) {
fake.hasParticipantMutex.RLock()
defer fake.hasParticipantMutex.RUnlock()
argsForCall := fake.hasParticipantArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3
}
func (fake *FakeObjectStore) HasParticipantReturns(result1 bool, result2 error) {
fake.hasParticipantMutex.Lock()
defer fake.hasParticipantMutex.Unlock()
fake.HasParticipantStub = nil
fake.hasParticipantReturns = struct {
result1 bool
result2 error
}{result1, result2}
}
func (fake *FakeObjectStore) HasParticipantReturnsOnCall(i int, result1 bool, result2 error) {
fake.hasParticipantMutex.Lock()
defer fake.hasParticipantMutex.Unlock()
fake.HasParticipantStub = nil
if fake.hasParticipantReturnsOnCall == nil {
fake.hasParticipantReturnsOnCall = make(map[int]struct {
result1 bool
result2 error
})
}
fake.hasParticipantReturnsOnCall[i] = struct {
result1 bool
result2 error
}{result1, result2}
}
func (fake *FakeObjectStore) ListParticipants(arg1 context.Context, arg2 livekit.RoomName) ([]*livekit.ParticipantInfo, error) {
fake.listParticipantsMutex.Lock()
ret, specificReturn := fake.listParticipantsReturnsOnCall[len(fake.listParticipantsArgsForCall)]