filter

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: CC0-1.0 Imports: 16 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

func Equal

func Equal(a, b *T) bool

Types

type B

type B = []byte

type E

type E = error

type N added in v0.0.14

type N = 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) Serialize

func (f *T) Serialize() (b B)

func (*T) String

func (f *T) String() (r S)

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