conditions

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: 8 Imported by: 0

README

conditions

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

Index

type AllCondition

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

func All
func All(conditions ...types.Condition) *AllCondition

All returns a new AllCondition.

func (*AllCondition) And
func (a *AllCondition) And(conditions ...types.Condition) types.Condition

For internal use only.

func (*AllCondition) Description
func (a *AllCondition) Description() string

Description implements types.Condition.

func (*AllCondition) Id
func (a *AllCondition) Id() string

Id implements types.Condition.

func (*AllCondition) IsSatisfiedBy
func (c *AllCondition) IsSatisfiedBy(oc context.Context, resource interface{}) error

IsSatisfiedBy implements types.Condition.

func (*AllCondition) WithCaching
func (a *AllCondition) WithCaching() *AllCondition

WithCaching returns a new AllCondition with caching enabled. This means that if a condition is satisfied, it will not be checked again.

type AnyCondition

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

func Any
func Any(conditions ...types.Condition) *AnyCondition

Any returns a condition that is satisfied if any of the given conditions are satisfied.

func (*AnyCondition) Description
func (a *AnyCondition) Description() string

Description implements types.Condition.

func (*AnyCondition) Id
func (a *AnyCondition) Id() string

Id implements types.Condition.

func (*AnyCondition) IsSatisfiedBy
func (c *AnyCondition) IsSatisfiedBy(oc context.Context, resource interface{}) error

IsSatisfiedBy implements types.Condition.

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Basic

func Basic(fn func(context.Context, interface{}) error, opts ...basicopts) basic

Basic returns a basic condition.

func Count

func Count(count int) basic

Count returns a condition that checks the count of a countable.

func CountComparator

func CountComparator(fn func(int) bool, failMessage string) basic

CountComparator returns a condition that checks the count of a countable based on the given comparator function.

func GreaterThan

func GreaterThan(count int) basic

GreaterThan returns a condition that checks the count of a countable.

func WithBasicDescription

func WithBasicDescription(desc string) basicopts

WithBasicDescription sets the description of the condition.

func WithBasicFailureMessage

func WithBasicFailureMessage(msg func(interface{}, error) string) basicopts

WithBasicFailureMessage sets the failure message of the condition.

Types

type AllCondition

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

func All

func All(conditions ...types.Condition) *AllCondition

All returns a new AllCondition.

func (*AllCondition) And

func (a *AllCondition) And(conditions ...types.Condition) types.Condition

For internal use only.

func (*AllCondition) Description

func (a *AllCondition) Description() string

Description implements types.Condition.

func (*AllCondition) Id

func (a *AllCondition) Id() string

Id implements types.Condition.

func (*AllCondition) IsSatisfiedBy

func (c *AllCondition) IsSatisfiedBy(oc context.Context, resource interface{}) error

IsSatisfiedBy implements types.Condition.

func (*AllCondition) WithCaching

func (a *AllCondition) WithCaching() *AllCondition

WithCaching returns a new AllCondition with caching enabled. This means that if a condition is satisfied, it will not be checked again.

type AnyCondition

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

func Any

func Any(conditions ...types.Condition) *AnyCondition

Any returns a condition that is satisfied if any of the given conditions are satisfied.

func (*AnyCondition) Description

func (a *AnyCondition) Description() string

Description implements types.Condition.

func (*AnyCondition) Id

func (a *AnyCondition) Id() string

Id implements types.Condition.

func (*AnyCondition) IsSatisfiedBy

func (c *AnyCondition) IsSatisfiedBy(oc context.Context, resource interface{}) error

IsSatisfiedBy implements types.Condition.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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