mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 19:44:21 +00:00
26 lines
379 B
Go
26 lines
379 B
Go
|
package mock
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"github.com/benbjohnson/clock"
|
||
|
|
||
|
"github.com/zitadel/zitadel/internal/logstore"
|
||
|
)
|
||
|
|
||
|
var _ logstore.LogRecord = (*record)(nil)
|
||
|
|
||
|
func NewRecord(clock clock.Clock) *record {
|
||
|
return &record{ts: clock.Now()}
|
||
|
}
|
||
|
|
||
|
type record struct {
|
||
|
ts time.Time
|
||
|
redacted bool
|
||
|
}
|
||
|
|
||
|
func (r record) Normalize() logstore.LogRecord {
|
||
|
r.redacted = true
|
||
|
return &r
|
||
|
}
|