matchers

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchCondition

func MatchCondition[T comparable](con *ConditionImpl[T]) types.GomegaMatcher

MatchCondition returns a Gomega matcher that checks if a Condition is equal to the expected one. If the passed in 'actual' is not a Condition, the matcher will fail. All fields which are set to their zero value in the expected condition will be ignored.

func NewCondition

func NewCondition[T comparable]() conditions.Condition[T]

func Ptr

func Ptr[T any](v T) *T

Types

type ConditionImpl

type ConditionImpl[T comparable] struct {
	// contains filtered or unexported fields
}

func NewConditionImpl

func NewConditionImpl[T comparable]() *ConditionImpl[T]

func NewConditionImplFromCondition

func NewConditionImplFromCondition[T comparable](con conditions.Condition[T]) *ConditionImpl[T]

func NewConditionImplFromValues

func NewConditionImplFromValues[T comparable](conType string, status T, reason, message string, now time.Time) *ConditionImpl[T]

func (*ConditionImpl[T]) GetLastTransitionTime

func (c *ConditionImpl[T]) GetLastTransitionTime() time.Time

func (*ConditionImpl[T]) GetMessage

func (c *ConditionImpl[T]) GetMessage() string

func (*ConditionImpl[T]) GetReason

func (c *ConditionImpl[T]) GetReason() string

func (*ConditionImpl[T]) GetStatus

func (c *ConditionImpl[T]) GetStatus() T

func (*ConditionImpl[T]) GetType

func (c *ConditionImpl[T]) GetType() string

func (*ConditionImpl[T]) HasLastTransitionTime

func (c *ConditionImpl[T]) HasLastTransitionTime() bool

func (*ConditionImpl[T]) HasMessage

func (c *ConditionImpl[T]) HasMessage() bool

func (*ConditionImpl[T]) HasReason

func (c *ConditionImpl[T]) HasReason() bool

func (*ConditionImpl[T]) HasStatus

func (c *ConditionImpl[T]) HasStatus() bool

func (*ConditionImpl[T]) HasType

func (c *ConditionImpl[T]) HasType() bool

func (*ConditionImpl[T]) SetLastTransitionTime

func (c *ConditionImpl[T]) SetLastTransitionTime(timestamp time.Time)

func (*ConditionImpl[T]) SetMessage

func (c *ConditionImpl[T]) SetMessage(message string)

func (*ConditionImpl[T]) SetReason

func (c *ConditionImpl[T]) SetReason(reason string)

func (*ConditionImpl[T]) SetStatus

func (c *ConditionImpl[T]) SetStatus(status T)

func (*ConditionImpl[T]) SetType

func (c *ConditionImpl[T]) SetType(conType string)

func (*ConditionImpl[T]) String

func (c *ConditionImpl[T]) String() string

func (*ConditionImpl[T]) WithLastTransitionTime

func (c *ConditionImpl[T]) WithLastTransitionTime(timestamp time.Time) *ConditionImpl[T]

func (*ConditionImpl[T]) WithMessage

func (c *ConditionImpl[T]) WithMessage(message string) *ConditionImpl[T]

func (*ConditionImpl[T]) WithReason

func (c *ConditionImpl[T]) WithReason(reason string) *ConditionImpl[T]

func (*ConditionImpl[T]) WithStatus

func (c *ConditionImpl[T]) WithStatus(status T) *ConditionImpl[T]

func (*ConditionImpl[T]) WithTimestampTolerance

func (c *ConditionImpl[T]) WithTimestampTolerance(t time.Duration) *ConditionImpl[T]

func (*ConditionImpl[T]) WithType

func (c *ConditionImpl[T]) WithType(conType string) *ConditionImpl[T]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳