Help us shape the future of Go! Take the 2026 Go Developer Survey

pattern

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package pattern implements EventBridge event patterns, which SNS filter policies (and Lambda event filters) share: literals, prefix, suffix, anything-but, numeric, exists, equals-ignore-case, wildcard, cidr and $or.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pattern

type Pattern struct {
	// contains filtered or unexported fields
}

Pattern is a compiled pattern.

func Compile

func Compile(src string) (*Pattern, error)

Compile parses a JSON pattern.

func (*Pattern) Match

func (p *Pattern) Match(event map[string]any) bool

Match reports whether a decoded JSON event matches.

func (*Pattern) MatchJSON

func (p *Pattern) MatchJSON(b []byte) bool

MatchJSON matches a raw JSON event; invalid JSON never matches.

Jump to

Keyboard shortcuts

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