Documentation
¶
Overview ¶
Package store is an interface and ancillary helpers and types for defining a series of API elements for abstracting the event storage from the implementation.
It is composed so that the top-level interface can be partially implemented if need be.
Index ¶
- Variables
- type Accountant
- type Configuration
- type Configurationer
- type Deleter
- type EventIdSerialer
- type Exporter
- type GetIdsWriter
- type I
- type IdPkTs
- type Importer
- type Initer
- type LogLeveler
- type OK
- type Pather
- type Querent
- type Querier
- type Req
- type Rescanner
- type Responder
- type Saver
- type SerialByIder
- type SubID
- type Syncer
- type Wiper
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDupEvent = errors.New("duplicate: event already exists") ErrEventNotExists = errors.New("unknown: event not known by any source of this realy") )
Functions ¶
This section is empty.
Types ¶
type Accountant ¶
type Configuration ¶
type Configuration struct {
BlockList []string `json:"block_list" doc:"list of IP addresses that will be ignored"`
}
type Configurationer ¶
type EventIdSerialer ¶
type EventIdSerialer interface {
EventIdsBySerial(start uint64, count int) (
evs []eventidserial.E,
err error,
)
}
type GetIdsWriter ¶
type I ¶
type I interface {
Pather
io.Closer
Pather
Wiper
Querier
Querent
Deleter
Saver
Importer
Exporter
Syncer
LogLeveler
EventIdSerialer
Initer
SerialByIder
}
I am a type for a persistence layer for nostr events handled by a relay.
type LogLeveler ¶
type LogLeveler interface {
SetLogLevel(level string)
}
type OK ¶
type OK = okenvelope.T
type Pather ¶
type Pather interface {
// Path returns the directory of the database.
Path() (s string)
}
type Rescanner ¶
type Rescanner interface {
// Rescan triggers the regeneration of indexes of the database to enable old
// records to be found with new indexes.
Rescan() (err error)
}
type Responder ¶
type Responder = http.ResponseWriter
type SerialByIder ¶ added in v0.2.13
type SubID ¶
type SubID = subscription.Id
Click to show internal directories.
Click to hide internal directories.