postgresql

package
v1.0.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerInfo

type PeerInfo struct {
	Address    string
	LastUpdate time.Time
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL