Files
nostrlib/eventstore/nullstore/lib.go
2025-04-15 08:51:25 -03:00

37 lines
679 B
Go

package nullstore
import (
"context"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
)
var _ eventstore.Store = NullStore{}
type NullStore struct{}
func (b NullStore) Init() error {
return nil
}
func (b NullStore) Close() {}
func (b NullStore) DeleteEvent(ctx context.Context, evt *nostr.Event) error {
return nil
}
func (b NullStore) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error) {
ch := make(chan *nostr.Event)
close(ch)
return ch, nil
}
func (b NullStore) SaveEvent(ctx context.Context, evt *nostr.Event) error {
return nil
}
func (b NullStore) ReplaceEvent(ctx context.Context, evt *nostr.Event) error {
return nil
}