jsonpath

package
v0.0.0-...-6aea363 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 9 Imported by: 0

README

jsonpath

import "github.com/eclipse-symphony/symphony/packages/testutils/conditions/jsonpath"

Index

type JpCondition

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

func MustNew
func MustNew(path string, opts ...Option) *JpCondition

MustNew returns a new JqCondition. It panics if the condition cannot be created.

func New
func New(path string, opts ...Option) (*JpCondition, error)

New returns a new JqCondition.

func (*JpCondition) Description
func (j *JpCondition) Description() string

Description implements types.Condition.

func (*JpCondition) Id
func (j *JpCondition) Id() string

Id implements types.Condition.

func (*JpCondition) IsSatisfiedBy
func (j *JpCondition) IsSatisfiedBy(c context.Context, resource interface{}) error

IsSatisfiedBy implements condition.Condition.

type Option

type Option func(*JpCondition)

func WithCustomMatcher
func WithCustomMatcher(matcher func(ctx context.Context, value, root interface{}, log logger.Logger) error) Option

WithCustomMatcher specifies the matcher to be used to match the jsonpath result.

func WithDescription
func WithDescription(description string) Option

WithDescription sets the description of the condition.

func WithLogger
func WithLogger(log func(format string, args ...interface{})) Option

WithLogger specifies the logger to be used to log the jsonpath operations.

func WithValue
func WithValue(value interface{}) Option

WithValue does an equality check on the jsonpath result.

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JpCondition

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

func MustNew

func MustNew(path string, opts ...Option) *JpCondition

MustNew returns a new JqCondition. It panics if the condition cannot be created.

func New

func New(path string, opts ...Option) (*JpCondition, error)

New returns a new JqCondition.

func (*JpCondition) Description

func (j *JpCondition) Description() string

Description implements types.Condition.

func (*JpCondition) Id

func (j *JpCondition) Id() string

Id implements types.Condition.

func (*JpCondition) IsSatisfiedBy

func (j *JpCondition) IsSatisfiedBy(c context.Context, resource interface{}) error

IsSatisfiedBy implements condition.Condition.

type Option

type Option func(*JpCondition)

func WithCustomMatcher

func WithCustomMatcher(matcher func(ctx context.Context, value, root interface{}, log logger.Logger) error) Option

WithCustomMatcher specifies the matcher to be used to match the jsonpath result.

func WithDescription

func WithDescription(description string) Option

WithDescription sets the description of the condition.

func WithLogger

func WithLogger(log func(format string, args ...interface{})) Option

WithLogger specifies the logger to be used to log the jsonpath operations.

func WithValue

func WithValue(value interface{}) Option

WithValue does an equality check on the jsonpath result.

Jump to

Keyboard shortcuts

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