Documentation ¶
Index ¶
- type PeerInfo
- type PostgresBackend
- func (b *PostgresBackend) AfterSave(evt *nostr.Event)
- func (b *PostgresBackend) BeforeSave(evt *nostr.Event)
- func (b PostgresBackend) DeleteEvent(id string, pubkey string) error
- func (b *PostgresBackend) GetPeer(pubkey string) string
- func (b *PostgresBackend) Init() error
- func (b PostgresBackend) QueryEvents(filter *nostr.Filter) (events []nostr.Event, err error)
- func (b *PostgresBackend) SaveEvent(evt *nostr.Event) error
- func (b *PostgresBackend) SavePeer(address string, pubkey string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresBackend ¶
type PostgresBackend struct { *sqlx.DB DatabaseURL string Map map[string]PeerInfo ServiceName string }
func (*PostgresBackend) AfterSave ¶
func (b *PostgresBackend) AfterSave(evt *nostr.Event)
func (*PostgresBackend) BeforeSave ¶
func (b *PostgresBackend) BeforeSave(evt *nostr.Event)
func (PostgresBackend) DeleteEvent ¶
func (b PostgresBackend) DeleteEvent(id string, pubkey string) error
func (*PostgresBackend) GetPeer ¶
func (b *PostgresBackend) GetPeer(pubkey string) string
func (*PostgresBackend) Init ¶
func (b *PostgresBackend) Init() error
func (PostgresBackend) QueryEvents ¶
func (b PostgresBackend) QueryEvents(filter *nostr.Filter) (events []nostr.Event, err error)
func (*PostgresBackend) SaveEvent ¶
func (b *PostgresBackend) SaveEvent(evt *nostr.Event) error
func (*PostgresBackend) SavePeer ¶
func (b *PostgresBackend) SavePeer(address string, pubkey string)
Click to show internal directories.
Click to hide internal directories.