Documentation
¶
Index ¶
- Variables
- func EdgeDBEventToNostrEvent(event Event) (*nostr.Event, error)
- type EdgeDBBackend
- func (b *EdgeDBBackend) Close()
- func (b *EdgeDBBackend) DeleteEvent(ctx context.Context, event *nostr.Event) error
- func (b *EdgeDBBackend) Init() error
- func (b *EdgeDBBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
- func (b *EdgeDBBackend) ReplaceEvent(ctx context.Context, evt *nostr.Event) error
- func (b *EdgeDBBackend) SaveEvent(ctx context.Context, event *nostr.Event) error
- type Event
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type EdgeDBBackend ¶
type EdgeDBBackend struct {
sync.Mutex
*edgedb.Client
DatabaseURI string
TLSSkipVerify bool
QueryIDsLimit int
QueryAuthorsLimit int
QueryKindsLimit int
QueryTagsLimit int
QueryLimit int
}
func (*EdgeDBBackend) Close ¶
func (b *EdgeDBBackend) Close()
Close implements the Close method of the eventstore.Store interface
func (*EdgeDBBackend) DeleteEvent ¶
DeleteEvent implements the method of the eventstore.Store interface
func (*EdgeDBBackend) Init ¶
func (b *EdgeDBBackend) Init() error
Init implements the Init method of the eventstore.Store inteface. It establishes the connection with Edgedb
func (*EdgeDBBackend) QueryEvents ¶
func (b *EdgeDBBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
QueryEvents is an implementation of the QueryEvents method of the eventstore.Store interfac for edgedb
func (*EdgeDBBackend) ReplaceEvent ¶ added in v0.15.0
type Event ¶
type Event struct {
ID edgedb.UUID `edgedb:"id"`
EventID string `edgedb:"eventId"`
Pubkey string `edgedb:"pubkey"`
CreatedAt edgedb.OptionalDateTime `edgedb:"createdAt"`
Kind int64 `edgedb:"kind"`
Tags [][]byte `edgedb:"tags"`
Content edgedb.OptionalStr `edgedb:"content"`
Sig string `edgedb:"sig"`
}
Click to show internal directories.
Click to hide internal directories.