| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| "v.io/x/ref/lib/security/audit" |
| func NewMockBlessingAuditor() (audit.Auditor, BlessingLogReader) { |
| return &blessingAuditor{db}, &blessingLogReader{db} |
| type mockDatabase struct { |
| func (db *mockDatabase) Insert(ctx *context.T, entry databaseEntry) error { |
| func (db *mockDatabase) Query(ctx *context.T, email string) <-chan databaseEntry { |
| c := make(chan databaseEntry) |
| if !reflect.DeepEqual(db.NextEntry, empty) { |