condition

package
v0.0.10-dev Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition interface {
	Matches(ctx Context) bool
}

type Context

type Context interface {
	DefinitionRegistry() container.DefinitionRegistry
	Container() container.Container
	Environment() env.Environment
}

type Evaluator

type Evaluator interface {
	ShouldSkip(conditions []Condition) bool
}

func NewEvaluator

func NewEvaluator(container container.Container, environment env.Environment) Evaluator

type OnMissingCondition

type OnMissingCondition struct {
}

func OnMissing

func OnMissing(name string) *OnMissingCondition

func (*OnMissingCondition) Matches

func (c *OnMissingCondition) Matches(ctx Context) bool

type OnMissingTypeCondition

type OnMissingTypeCondition struct {
}

func OnMissingType

func OnMissingType[T any]() *OnMissingTypeCondition

func (*OnMissingTypeCondition) Matches

func (c *OnMissingTypeCondition) Matches(ctx Context) bool

type OnProfileCondition

type OnProfileCondition struct {
}

func OnProfile

func OnProfile(profiles ...string) *OnProfileCondition

func (*OnProfileCondition) Matches

func (c *OnProfileCondition) Matches(ctx Context) bool

type OnPropertyCondition

type OnPropertyCondition struct {
}

func OnProperty

func OnProperty(name string) *OnPropertyCondition

func (*OnPropertyCondition) HavingValue

func (c *OnPropertyCondition) HavingValue(value string) *OnPropertyCondition

func (*OnPropertyCondition) MatchIfMissing

func (c *OnPropertyCondition) MatchIfMissing(matchIfMissing bool) *OnPropertyCondition

func (*OnPropertyCondition) Matches

func (c *OnPropertyCondition) Matches(ctx Context) bool

func (*OnPropertyCondition) Prefix

func (c *OnPropertyCondition) Prefix(prefix string) *OnPropertyCondition

type OnTypeCondition

type OnTypeCondition struct {
}

func OnType

func OnType[T any]() *OnTypeCondition

func (*OnTypeCondition) Matches

func (c *OnTypeCondition) Matches(ctx Context) bool

Jump to

Keyboard shortcuts

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