expression

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToJsonStandard

func ToJsonStandard(v interface{}) (interface{}, error)

Types

type DurationFrom

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

func (*DurationFrom) Get

func (d *DurationFrom) Get(ctx context.Context, v interface{}, now time.Time) (time.Duration, bool)

type DurationGetter

type DurationGetter interface {
	Get(ctx context.Context, v interface{}, now time.Time) (time.Duration, bool)
}

func NewDurationFrom

func NewDurationFrom(value *time.Duration, src *string) (DurationGetter, error)

type Query

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

func NewQuery

func NewQuery(src string) (*Query, error)

func (*Query) Execute

func (q *Query) Execute(ctx context.Context, v interface{}) ([]interface{}, error)

type Requirement

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

Requirement contains values, a key, and an operator that relates the key and values. The zero value of Requirement is invalid.

func NewRequirement

func NewRequirement(key string, op internalversion.SelectorOperator, vals []string) (*Requirement, error)

NewRequirement is the constructor for a Requirement.

func (*Requirement) Matches

func (r *Requirement) Matches(ctx context.Context, matchData interface{}) (bool, error)

Matches returns true if the Requirement matches the input Labels. There is a match in the following cases:

Jump to

Keyboard shortcuts

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