bytesmatcher

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BytesMatcher

type BytesMatcher struct {
	Operator Operator `json:"operator"`
	Value    []byte   `json:"value"`
}

BytesMatcher matches a []byte based on an operator and a value

func Contains

func Contains(value []byte) *BytesMatcher

Contains constructs a new BytesMatcher that matches using the Contains operator

func Full

func Full(value []byte) *BytesMatcher

Full constructs a new BytesMatcher that matches using the Full operator

func Prefix

func Prefix(value []byte) *BytesMatcher

Prefix constructs a new BytesMatcher that matches using the Prefix operator

func Suffix

func Suffix(value []byte) *BytesMatcher

Suffix constructs a new BytesMatcher that matches using the Suffix operator

func (*BytesMatcher) Match

func (m *BytesMatcher) Match(value []byte) error

Match attempts to match a []byte based on the BytesMatcher

func (*BytesMatcher) UnmarshalJSON

func (m *BytesMatcher) UnmarshalJSON(b []byte) error

Unmarshal implements json.Unmarshaler

type Operator

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

Operator is en enum over types of BytesMatcher

func (Operator) MarshalJSON

func (o Operator) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface

func (Operator) String

func (o Operator) String() string

String implements fmt.Stringer

func (*Operator) UnmarshalJSON

func (o *Operator) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler interface

Jump to

Keyboard shortcuts

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