filter

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: CC0-1.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IDs     = B("ids")
	Kinds   = B("kinds")
	Authors = B("authors")
	Tags    = B("tags")
	Since   = B("since")
	Until   = B("until")
	Limit   = B("limit")
	Search  = B("search")
)

Functions

This section is empty.

Types

type B

type B = []byte

type E added in v0.0.4

type E = error

type I added in v0.0.4

type I = int

type S

type S = string

type T

type T struct {
	IDs     *tag.T       `json:"ids,omitempty"`
	Kinds   *kinds.T     `json:"kinds,omitempty"`
	Authors *tag.T       `json:"authors,omitempty"`
	Tags    *tags.T      `json:"-,omitempty"`
	Since   *timestamp.T `json:"since,omitempty"`
	Until   *timestamp.T `json:"until,omitempty"`
	Limit   int          `json:"limit,omitempty"`
	Search  B            `json:"search,omitempty"`
}

T is the primary query form for requesting events from a nostr relay.

func GenFilter

func GenFilter() (f *T, err error)

func New

func New() (f *T)

func (*T) MarshalJSON

func (f *T) MarshalJSON(dst B) (b B, err error)

func (*T) Matches

func (f *T) Matches(ev *event.T) bool

func (*T) UnmarshalJSON

func (f *T) UnmarshalJSON(b B) (r B, err error)

Jump to

Keyboard shortcuts

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