nip77

package
v0.49.7 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Up   = 0
	Down = 1
	Both = 2
)

Variables

This section is empty.

Functions

func FetchIDsOnly added in v0.49.7

func FetchIDsOnly(
	ctx context.Context,
	url string,
	filter nostr.Filter,
) (<-chan string, error)

func NegentropySync

func NegentropySync(
	ctx context.Context,
	store nostr.RelayStore,
	url string,
	filter nostr.Filter,
	dir Direction,
) error

func ParseNegMessage

func ParseNegMessage(message []byte) nostr.Envelope

Types

type CloseEnvelope

type CloseEnvelope struct {
	SubscriptionID string
}

func (CloseEnvelope) Label

func (_ CloseEnvelope) Label() string

func (CloseEnvelope) MarshalJSON

func (v CloseEnvelope) MarshalJSON() ([]byte, error)

func (CloseEnvelope) String

func (v CloseEnvelope) String() string

func (*CloseEnvelope) UnmarshalJSON

func (v *CloseEnvelope) UnmarshalJSON(data []byte) error

type Direction added in v0.44.2

type Direction int

type ErrorEnvelope

type ErrorEnvelope struct {
	SubscriptionID string
	Reason         string
}

func (ErrorEnvelope) Label

func (_ ErrorEnvelope) Label() string

func (ErrorEnvelope) MarshalJSON

func (v ErrorEnvelope) MarshalJSON() ([]byte, error)

func (ErrorEnvelope) String

func (v ErrorEnvelope) String() string

func (*ErrorEnvelope) UnmarshalJSON

func (v *ErrorEnvelope) UnmarshalJSON(data []byte) error

type MessageEnvelope

type MessageEnvelope struct {
	SubscriptionID string
	Message        string
}

func (MessageEnvelope) Label

func (_ MessageEnvelope) Label() string

func (MessageEnvelope) MarshalJSON

func (v MessageEnvelope) MarshalJSON() ([]byte, error)

func (MessageEnvelope) String

func (v MessageEnvelope) String() string

func (*MessageEnvelope) UnmarshalJSON

func (v *MessageEnvelope) UnmarshalJSON(data []byte) error

type OpenEnvelope

type OpenEnvelope struct {
	SubscriptionID string
	Filter         nostr.Filter
	Message        string
}

func (OpenEnvelope) Label

func (_ OpenEnvelope) Label() string

func (OpenEnvelope) MarshalJSON

func (v OpenEnvelope) MarshalJSON() ([]byte, error)

func (OpenEnvelope) String

func (v OpenEnvelope) String() string

func (*OpenEnvelope) UnmarshalJSON

func (v *OpenEnvelope) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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