properties

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePropertyRef

func ValidatePropertyRef(value construct.PropertyRef, propertyType string, ctx knowledgebase.DynamicContext) (refVal any, err error)

Types

type AnyProperty

type AnyProperty struct {
	SharedPropertyFields
	knowledgebase.PropertyDetails
}

func (*AnyProperty) AppendProperty

func (a *AnyProperty) AppendProperty(resource *construct.Resource, value any) error

func (*AnyProperty) Clone

func (a *AnyProperty) Clone() knowledgebase.Property

func (*AnyProperty) Contains

func (a *AnyProperty) Contains(value any, contains any) bool

func (*AnyProperty) Details

func (*AnyProperty) GetDefaultValue

func (*AnyProperty) Parse

func (*AnyProperty) RemoveProperty

func (a *AnyProperty) RemoveProperty(resource *construct.Resource, value any) error

func (*AnyProperty) SetProperty

func (a *AnyProperty) SetProperty(resource *construct.Resource, value any) error

func (*AnyProperty) SubProperties

func (a *AnyProperty) SubProperties() knowledgebase.Properties

func (*AnyProperty) Type

func (a *AnyProperty) Type() string

func (*AnyProperty) Validate

func (a *AnyProperty) Validate(resource *construct.Resource, value any, ctx knowledgebase.DynamicContext) error

func (*AnyProperty) ZeroValue

func (a *AnyProperty) ZeroValue() any

type BoolProperty

type BoolProperty struct {
	SharedPropertyFields
	knowledgebase.PropertyDetails
}

func (*BoolProperty) AppendProperty

func (b *BoolProperty) AppendProperty(resource *construct.Resource, value any) error

func (*BoolProperty) Clone

func (b *BoolProperty) Clone() knowledgebase.Property

func (*BoolProperty) Contains

func (b *BoolProperty) Contains(value any, contains any) bool

func (*BoolProperty) Details

func (*BoolProperty) GetDefaultValue

func (*BoolProperty) Parse

func (*BoolProperty) RemoveProperty

func (b *BoolProperty) RemoveProperty(resource *construct.Resource, value any) error

func (*BoolProperty) SetProperty

func (b *BoolProperty) SetProperty(resource *construct.Resource, value any) error

func (*BoolProperty) SubProperties

func (b *BoolProperty) SubProperties() knowledgebase.Properties

func (*BoolProperty) Type

func (b *BoolProperty) Type() string

func (*BoolProperty) Validate

func (b *BoolProperty) Validate(resource *construct.Resource, value any, ctx knowledgebase.DynamicContext) error

func (*BoolProperty) ZeroValue

func (b *BoolProperty) ZeroValue() any

type FloatProperty

type FloatProperty struct {
	MinValue *float64
	MaxValue *float64
	SharedPropertyFields
	knowledgebase.PropertyDetails
}

func (*FloatProperty) AppendProperty

func (f *FloatProperty) AppendProperty(resource *construct.Resource, value any) error

func (*FloatProperty) Clone

func (*FloatProperty) Contains

func (f *FloatProperty) Contains(value any, contains any) bool

func (*FloatProperty) Details

func (*FloatProperty) GetDefaultValue

func (*FloatProperty) Parse

func (*FloatProperty) RemoveProperty

func (f *FloatProperty) RemoveProperty(resource *construct.Resource, value any) error

func (*FloatProperty) SetProperty

func (f *FloatProperty) SetProperty(resource *construct.Resource, value any) error

func (*FloatProperty) SubProperties

func (f *FloatProperty) SubProperties() knowledgebase.Properties

func (*FloatProperty) Type

func (f *FloatProperty) Type() string

func (*FloatProperty) Validate

func (f *FloatProperty) Validate(resource *construct.Resource, value any, ctx knowledgebase.DynamicContext) error

func (*FloatProperty) ZeroValue

func (f *FloatProperty) ZeroValue() any

type IntProperty

type IntProperty struct {
	MinValue *int
	MaxValue *int
	SharedPropertyFields
	knowledgebase.PropertyDetails
}

func (*IntProperty) AppendProperty

func (i *IntProperty) AppendProperty(resource *construct.Resource, value any) error

func (*IntProperty) Clone

func (i *IntProperty) Clone() knowledgebase.Property

func (*IntProperty) Contains

func (i *IntProperty) Contains(value any, contains any) bool

func (*IntProperty) Details

func (*IntProperty) GetDefaultValue

func (*IntProperty) Parse

func (*IntProperty) RemoveProperty

func (i *IntProperty) RemoveProperty(resource *construct.Resource, value any) error

func (*IntProperty) SetProperty

func (i *IntProperty) SetProperty(resource *construct.Resource, value any) error

func (*IntProperty) SubProperties

func (i *IntProperty) SubProperties() knowledgebase.Properties

func (*IntProperty) Type

func (i *IntProperty) Type() string

func (*IntProperty) Validate

func (i *IntProperty) Validate(resource *construct.Resource, value any, ctx knowledgebase.DynamicContext) error

func (*IntProperty) ZeroValue

func (i *IntProperty) ZeroValue() any

type ListProperty

type ListProperty struct {
	MinLength    *int
	MaxLength    *int
	ItemProperty knowledgebase.Property
	Properties   knowledgebase.Properties
	SharedPropertyFields
	knowledgebase.PropertyDetails
}

func (*ListProperty) AppendProperty

func (l *ListProperty) AppendProperty(resource *construct.Resource, value any) error

func (*ListProperty) Clone

func (l *ListProperty) Clone() knowledgebase.Property

func (*ListProperty) Contains

func (l *ListProperty) Contains(value any, contains any) bool

func (*ListProperty) Details

func (*ListProperty) GetDefaultValue

func (list *ListProperty) GetDefaultValue(ctx knowledgebase.DynamicContext, data knowledgebase.DynamicValueData) (any, error)

func (*ListProperty) Item

func (*ListProperty) Parse

func (*ListProperty) RemoveProperty

func (l *ListProperty) RemoveProperty(resource *construct.Resource, value any) error

func (*ListProperty) SetProperty

func (l *ListProperty) SetProperty(resource *construct.Resource, value any) error

func (*ListProperty) SubProperties

func (l *ListProperty) SubProperties() knowledgebase.Properties

func (*ListProperty) Type

func (l *ListProperty) Type() string

func (*ListProperty) Validate

func (l *ListProperty) Validate(resource *construct.Resource, value any, ctx knowledgebase.DynamicContext) error

func (*ListProperty) ZeroValue

func (l *ListProperty) ZeroValue() any

type MapProperty

type MapProperty struct {
	MinLength     *int
	MaxLength     *int
	KeyProperty   knowledgebase.Property
	ValueProperty knowledgebase.Property
	Properties    knowledgebase.Properties
	SharedPropertyFields
	knowledgebase.PropertyDetails
}

func (*MapProperty) AppendProperty

func (m *MapProperty) AppendProperty(resource *construct.Resource, value any) error

func (*MapProperty) Clone

func (m *MapProperty) Clone() knowledgebase.Property

func (*MapProperty) Contains

func (m *MapProperty) Contains(value any, contains any) bool

func (*MapProperty) Details

func (*MapProperty) GetDefaultValue

func (*MapProperty) Key

func (*MapProperty) Parse

func (*MapProperty) RemoveProperty

func (m *MapProperty) RemoveProperty(resource *construct.Resource, value any) error

func (*MapProperty) SetProperty

func (m *MapProperty) SetProperty(resource *construct.Resource, value any) error

func (*MapProperty) SubProperties

func (m *MapProperty) SubProperties() knowledgebase.Properties

func (*MapProperty) Type

func (m *MapProperty) Type() string

func (*MapProperty) Validate

func (m *MapProperty) Validate(resource *construct.Resource, value any, ctx knowledgebase.DynamicContext) error

func (*MapProperty) Value

func (m *MapProperty) Value() knowledgebase.Property

func (*MapProperty) ZeroValue

func (m *MapProperty) ZeroValue() any

type PropertyValidityCheck

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

func (*PropertyValidityCheck) Validate

func (p *PropertyValidityCheck) Validate(value any, properties construct.Properties) error

type ResourceProperty

type ResourceProperty struct {
	AllowedTypes construct.ResourceList
	SharedPropertyFields
	knowledgebase.PropertyDetails
}

func (*ResourceProperty) AppendProperty

func (r *ResourceProperty) AppendProperty(resource *construct.Resource, value any) error

func (*ResourceProperty) Clone

func (*ResourceProperty) Contains

func (r *ResourceProperty) Contains(value any, contains any) bool

func (*ResourceProperty) Details

func (*ResourceProperty) GetDefaultValue

func (*ResourceProperty) Parse

func (*ResourceProperty) RemoveProperty

func (r *ResourceProperty) RemoveProperty(resource *construct.Resource, value any) error

func (*ResourceProperty) SetProperty

func (r *ResourceProperty) SetProperty(resource *construct.Resource, value any) error

func (*ResourceProperty) SubProperties

func (r *ResourceProperty) SubProperties() knowledgebase.Properties

func (*ResourceProperty) Type

func (r *ResourceProperty) Type() string

func (*ResourceProperty) Validate

func (r *ResourceProperty) Validate(resource *construct.Resource, value any, ctx knowledgebase.DynamicContext) error

func (*ResourceProperty) ZeroValue

func (r *ResourceProperty) ZeroValue() any

type SetProperty

type SetProperty struct {
	MinLength    *int
	MaxLength    *int
	ItemProperty knowledgebase.Property
	Properties   knowledgebase.Properties
	SharedPropertyFields
	knowledgebase.PropertyDetails
}

func (*SetProperty) AppendProperty

func (s *SetProperty) AppendProperty(resource *construct.Resource, value any) error

func (*SetProperty) Clone

func (s *SetProperty) Clone() knowledgebase.Property

func (*SetProperty) Contains

func (s *SetProperty) Contains(value any, contains any) bool

func (*SetProperty) Details

func (*SetProperty) GetDefaultValue

func (*SetProperty) Item

func (*SetProperty) Parse

func (*SetProperty) RemoveProperty

func (s *SetProperty) RemoveProperty(resource *construct.Resource, value any) error

func (*SetProperty) SetProperty

func (s *SetProperty) SetProperty(resource *construct.Resource, value any) error

func (*SetProperty) SubProperties

func (s *SetProperty) SubProperties() knowledgebase.Properties

func (*SetProperty) Type

func (s *SetProperty) Type() string

func (*SetProperty) Validate

func (s *SetProperty) Validate(resource *construct.Resource, value any, ctx knowledgebase.DynamicContext) error

func (*SetProperty) ZeroValue

func (s *SetProperty) ZeroValue() any

type SharedPropertyFields

type SharedPropertyFields struct {
	DefaultValue   any
	ValidityChecks []PropertyValidityCheck
}

type StringProperty

type StringProperty struct {
	SanitizeTmpl  *knowledgebase.SanitizeTmpl
	AllowedValues []string
	SharedPropertyFields
	knowledgebase.PropertyDetails
}

func (*StringProperty) AppendProperty

func (str *StringProperty) AppendProperty(resource *construct.Resource, value any) error

func (*StringProperty) Clone

func (*StringProperty) Contains

func (s *StringProperty) Contains(value any, contains any) bool

func (*StringProperty) Details

func (*StringProperty) GetDefaultValue

func (*StringProperty) Parse

func (*StringProperty) RemoveProperty

func (str *StringProperty) RemoveProperty(resource *construct.Resource, value any) error

func (*StringProperty) SetProperty

func (str *StringProperty) SetProperty(resource *construct.Resource, value any) error

func (*StringProperty) SubProperties

func (s *StringProperty) SubProperties() knowledgebase.Properties

func (*StringProperty) Type

func (s *StringProperty) Type() string

func (*StringProperty) Validate

func (s *StringProperty) Validate(resource *construct.Resource, value any, ctx knowledgebase.DynamicContext) error

func (*StringProperty) ZeroValue

func (s *StringProperty) ZeroValue() any

type ValidityCheckData

type ValidityCheckData struct {
	Properties construct.Properties `json:"properties" yaml:"properties"`
	Value      any                  `json:"value" yaml:"value"`
}

Jump to

Keyboard shortcuts

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