relayer29

package
v0.0.0-...-00c258d Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(opts relay29.Options) (relayer.Relay, *relay29.State)

Types

type Relay

type Relay struct {
	NIP11Info  func() nip11.RelayInformationDocument
	RejectFunc func(*nostr.Event) (bool, string)
	// contains filtered or unexported fields
}

func (*Relay) AcceptEvent

func (r *Relay) AcceptEvent(ctx context.Context, ev *nostr.Event) bool

func (*Relay) AddEvent

func (r *Relay) AddEvent(ctx context.Context, ev *nostr.Event) (skipBroadcast bool, writeError error)

func (*Relay) BroadcastEvent

func (r *Relay) BroadcastEvent(ev *nostr.Event)

func (*Relay) GetNIP11InformationDocument

func (r *Relay) GetNIP11InformationDocument() nip11.RelayInformationDocument

func (*Relay) Init

func (r *Relay) Init() error

func (*Relay) Name

func (r *Relay) Name() string

func (*Relay) Storage

func (r *Relay) Storage(ctx context.Context) eventstore.Store

type Store

type Store struct {
	// contains filtered or unexported fields
}

func (*Store) Close

func (s *Store) Close()

func (*Store) DeleteEvent

func (s *Store) DeleteEvent(ctx context.Context, ev *nostr.Event) error

func (*Store) Init

func (s *Store) Init() error

func (*Store) QueryEvents

func (s *Store) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error)

func (*Store) SaveEvent

func (s *Store) SaveEvent(ctx context.Context, ev *nostr.Event) error

Jump to

Keyboard shortcuts

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