Documentation ¶
Index ¶
- Variables
- func GetAddrTagElements(tagValue st) (k uint16, pkb by, d st)
- func Less(a, b tag.T) bo
- func TagSorter(a, b tag.T) no
- type Counter
- type Deleter
- type Exporter
- type I
- type Importer
- type Initer
- type Nuker
- type OK
- type Pather
- type Querent
- type Req
- type Responder
- type Saver
- type SubID
- type Syncer
- type WS
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 ¶
func GetAddrTagElements ¶
func GetAddrTagElements(tagValue st) (k uint16, pkb by, d st)
Types ¶
type I ¶
type I interface { Initer Pather io.Closer Pather Nuker Querent Counter Deleter Saver Importer Exporter Syncer }
I is an types for a persistence layer for nostr events handled by a relay.
type Initer ¶ added in v1.7.2
type Initer interface { // Init is called at the very beginning by [Server.Start], after [Relay.Init], // allowing a storage to initialize its internal resources. The parameters can be // used by the database implementations to set custom parameters such as cache // management and other relevant parameters to the specific implementation. Init(path st) (err er) }
type Nuker ¶ added in v1.7.2
type Nuker interface {
// Nuke deletes everything in the database.
Nuke() (err er)
}
type OK ¶
type OK = okenvelope.T
type Pather ¶ added in v1.5.2
type Pather interface {
// Path returns the directory of the database.
Path() (s st)
}
type Responder ¶
type Responder = http.ResponseWriter
type SubID ¶
type SubID = subscription.Id
Click to show internal directories.
Click to hide internal directories.