assumes

package
v0.0.0-...-4308112 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositeExpression

type CompositeExpression struct {
	ExprType       ExpressionType
	SubExpressions []Expression
}

CompositeExpression describes a composite expression that applies some operator to a sub-expression list.

func (CompositeExpression) Type

func (expr CompositeExpression) Type() ExpressionType

Type implements Expression.

type Expression

type Expression interface {
	Type() ExpressionType
}

Expression is an interface implemented by all expression types in this package.

type ExpressionTree

type ExpressionTree struct {
	Expression Expression
}

ExpressionTree is a wrapper for representing a (possibly nested) "assumes" block declaration.

func (*ExpressionTree) GetBSON

func (tree *ExpressionTree) GetBSON() (interface{}, error)

GetBSON implements the bson.Getter interface.

func (*ExpressionTree) MarshalJSON

func (tree *ExpressionTree) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*ExpressionTree) MarshalYAML

func (tree *ExpressionTree) MarshalYAML() (interface{}, error)

MarshalYAML implements the yaml.Marshaler interface.

func (*ExpressionTree) SetBSON

func (tree *ExpressionTree) SetBSON(data bson.Raw) error

SetBSON implements the bson.Setter interface.

func (*ExpressionTree) UnmarshalJSON

func (tree *ExpressionTree) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*ExpressionTree) UnmarshalYAML

func (tree *ExpressionTree) UnmarshalYAML(unmarshalFn func(interface{}) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

type ExpressionType

type ExpressionType string

ExpressionType represents the type of an assumes expression.

const (
	AnyOfExpression ExpressionType = "any-of"
	AllOfExpression ExpressionType = "all-of"
)

type FeatureExpression

type FeatureExpression struct {
	// The name of the featureflag.
	Name string

	// A feature within an assumes block may optionally specify a version
	// constraint.
	Constraint VersionConstraint
	Version    *version.Number
	// contains filtered or unexported fields
}

FeatureExpression describes a feature that is required by the charm in order to be successfully deployed. Feature expressions may additionally specify a version constraint.

func (FeatureExpression) Type

Type implements Expression.

type VersionConstraint

type VersionConstraint string

VersionConstraint describes a constraint for required feature versions.

const (
	VersionGTE VersionConstraint = ">="
	VersionLT  VersionConstraint = "<"
)

Jump to

Keyboard shortcuts

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