Documentation ¶
Index ¶
- type ElasticsearchStorage
- func (ess *ElasticsearchStorage) Close()
- func (ess *ElasticsearchStorage) CountEvents(ctx context.Context, filter nostr.Filter) (int64, error)
- func (ess *ElasticsearchStorage) DeleteEvent(ctx context.Context, evt *nostr.Event) error
- func (ess *ElasticsearchStorage) Init() error
- func (ess *ElasticsearchStorage) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
- func (ess *ElasticsearchStorage) SaveEvent(ctx context.Context, evt *nostr.Event) error
- type EsCountResult
- type EsSearchResult
- type IndexedEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticsearchStorage ¶
type ElasticsearchStorage struct { URL string IndexName string // contains filtered or unexported fields }
func (*ElasticsearchStorage) Close ¶
func (ess *ElasticsearchStorage) Close()
func (*ElasticsearchStorage) CountEvents ¶
func (ess *ElasticsearchStorage) CountEvents(ctx context.Context, filter nostr.Filter) (int64, error)
func (*ElasticsearchStorage) DeleteEvent ¶
func (ess *ElasticsearchStorage) DeleteEvent(ctx context.Context, evt *nostr.Event) error
func (*ElasticsearchStorage) Init ¶
func (ess *ElasticsearchStorage) Init() error
func (*ElasticsearchStorage) QueryEvents ¶
func (ess *ElasticsearchStorage) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)
type EsCountResult ¶
type EsCountResult struct {
Count int64
}
type EsSearchResult ¶
type EsSearchResult struct { Took int TimedOut bool `json:"timed_out"` Hits struct { Total struct { Value int Relation string } Hits []struct { Source IndexedEvent `json:"_source"` } } }
type IndexedEvent ¶
type IndexedEvent struct { Event nostr.Event `json:"event"` ContentSearch string `json:"content_search"` }
Click to show internal directories.
Click to hide internal directories.