validation

package
v0.3.3-nightly Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSignature

func CheckSignature(evt relay.Event) bool

CheckSignature verifies the event's signature and ID

func ValidateEventTimestamp

func ValidateEventTimestamp(evt relay.Event, cfg *configTypes.ServerConfig) bool

ValidateEventTimestamp validates if an event's timestamp is within the allowed range

Types

type Result

type Result struct {
	Valid   bool
	Message string
}

Result represents the outcome of a validation check

func CheckBlacklistAndWhitelist

func CheckBlacklistAndWhitelist(evt relay.Event) Result

CheckBlacklistAndWhitelist checks if an event is allowed by the blacklist and whitelist rules

func CheckRateAndSizeLimits

func CheckRateAndSizeLimits(evt relay.Event, eventSize int) Result

CheckRateAndSizeLimits checks if an event passes rate and size limits

Jump to

Keyboard shortcuts

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