go-ssb-room/roomdb/mockdb/auth.go

38 lines
1006 B
Go

// Code generated by counterfeiter. DO NOT EDIT.
package mockdb
import (
"sync"
"github.com/ssb-ngi-pointer/go-ssb-room/roomdb"
)
type FakeAuthWithSSBService struct {
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeAuthWithSSBService) 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 *FakeAuthWithSSBService) 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 _ roomdb.AuthWithSSBService = new(FakeAuthWithSSBService)