Documentation ¶
Index ¶
- type CompositeExpression
- type Expression
- type ExpressionTree
- func (tree *ExpressionTree) GetBSON() (interface{}, error)
- func (tree *ExpressionTree) MarshalJSON() ([]byte, error)
- func (tree *ExpressionTree) MarshalYAML() (interface{}, error)
- func (tree *ExpressionTree) SetBSON(data bson.Raw) error
- func (tree *ExpressionTree) UnmarshalJSON(data []byte) error
- func (tree *ExpressionTree) UnmarshalYAML(unmarshalFn func(interface{}) error) error
- type ExpressionType
- type FeatureExpression
- type VersionConstraint
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 ¶
func (FeatureExpression) Type() ExpressionType
Type implements Expression.
type VersionConstraint ¶
type VersionConstraint string
VersionConstraint describes a constraint for required feature versions.
const ( VersionGTE VersionConstraint = ">=" VersionLT VersionConstraint = "<" )