Documentation ¶
Index ¶
- func Init(opts relay29.Options) (relayer.Relay, *relay29.State)
- type Relay
- func (r *Relay) AcceptEvent(ctx context.Context, ev *nostr.Event) bool
- func (r *Relay) AddEvent(ctx context.Context, ev *nostr.Event) (skipBroadcast bool, writeError error)
- func (r *Relay) BroadcastEvent(ev *nostr.Event)
- func (r *Relay) GetNIP11InformationDocument() nip11.RelayInformationDocument
- func (r *Relay) Init() error
- func (r *Relay) Name() string
- func (r *Relay) Storage(ctx context.Context) eventstore.Store
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Relay ¶
type Relay struct { NIP11Info func() nip11.RelayInformationDocument RejectFunc func(*nostr.Event) (bool, string) // contains filtered or unexported fields }
func (*Relay) BroadcastEvent ¶
func (r *Relay) BroadcastEvent(ev *nostr.Event)
func (*Relay) GetNIP11InformationDocument ¶
func (r *Relay) GetNIP11InformationDocument() nip11.RelayInformationDocument
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) QueryEvents ¶
Click to show internal directories.
Click to hide internal directories.