plugins

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoComplexFilters

func NoComplexFilters(ctx context.Context, filter nostr.Filter) (reject bool, msg string)

func NoEmptyFilters added in v0.0.8

func NoEmptyFilters(ctx context.Context, filter nostr.Filter) (reject bool, msg string)

func NoSearchQueries added in v0.0.8

func NoSearchQueries(ctx context.Context, filter nostr.Filter) (reject bool, msg string)

func PreventLargeTags added in v0.0.11

func PreventLargeTags(maxTagValueLen int) func(context.Context, *nostr.Event) (bool, string)

PreventLargeTags rejects events that have indexable tag values greater than maxTagValueLen.

func PreventTimestampsInTheFuture added in v0.0.7

func PreventTimestampsInTheFuture(thresholdSeconds nostr.Timestamp) func(context.Context, *nostr.Event) (bool, string)

func PreventTimestampsInThePast added in v0.0.7

func PreventTimestampsInThePast(thresholdSeconds nostr.Timestamp) func(context.Context, *nostr.Event) (bool, string)

func PreventTooManyIndexableTags

func PreventTooManyIndexableTags(max int) func(context.Context, *nostr.Event) (bool, string)

PreventTooManyIndexableTags returns a function that can be used as a RejectFilter that will reject events with more indexable (single-character) tags than the specified number.

func RemoveAllButKinds added in v0.0.8

func RemoveAllButKinds(kinds ...uint16) func(context.Context, *nostr.Filter)

func RemoveAllButTags added in v0.0.8

func RemoveAllButTags(tagNames ...string) func(context.Context, *nostr.Filter)

func RemoveSearchQueries added in v0.0.8

func RemoveSearchQueries(ctx context.Context, filter *nostr.Filter)

func RestrictToSpecifiedKinds added in v0.0.4

func RestrictToSpecifiedKinds(kinds ...uint16) func(context.Context, *nostr.Event) (bool, string)

RestrictToSpecifiedKinds returns a function that can be used as a RejectFilter that will reject any events with kinds different than the specified ones.

Types

This section is empty.

Jump to

Keyboard shortcuts

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