property

package
v3.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataType

type DataType string
var (
	DataTypeString  DataType = "string"
	DataTypeInteger DataType = "integer"
	DataTypeFloat   DataType = "float"
	DataTypeBoolean DataType = "boolean"
)

type Iterable

type Iterable interface {
	Items() []any
}

type Property

type Property struct {
	DataType  DataType  `json:"dataType"`
	ValueType ValueType `json:"valueType"`

	DisplayName string `json:"displayName"`

	SettingValidation
}

func (*Property) DeepCopy

func (in *Property) DeepCopy() *Property

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Property.

func (*Property) DeepCopyInto

func (in *Property) DeepCopyInto(out *Property)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Property) FromJSON

func (p Property) FromJSON(value string) (any, error)

func (Property) ToJSON

func (p Property) ToJSON(value string) ([]byte, error)

func (Property) Validate

func (p Property) Validate(value string) error

Validate executes validation of value given rules and definitions in Property

type SettingValidation

type SettingValidation struct {
	Required    bool     `json:"required,omitempty"`
	Maximum     *float64 `json:"maximum,omitempty"`
	Minimum     *float64 `json:"minimum,omitempty"`
	MaxLength   *int64   `json:"maxLength,omitempty"`
	MinLength   *int64   `json:"minLength,omitempty"`
	Format      *string  `json:"format,omitempty"`
	Pattern     *string  `json:"pattern,omitempty"`
	Enum        []string `json:"enum,omitempty"`
	Default     *string  `json:"default,omitempty"`
	UniqueItems bool     `json:"uniqueItems,omitempty"`
}

func (*SettingValidation) DeepCopy

func (in *SettingValidation) DeepCopy() *SettingValidation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SettingValidation.

func (*SettingValidation) DeepCopyInto

func (in *SettingValidation) DeepCopyInto(out *SettingValidation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TypeConversionError

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

func NewTypeConversionErrorf

func NewTypeConversionErrorf(v string, t string) TypeConversionError

func (TypeConversionError) Error

func (t TypeConversionError) Error() string

type ValidationError

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

func NewValidationErrorf

func NewValidationErrorf(msg string, value ...any) ValidationError

func (ValidationError) Error

func (v ValidationError) Error() string

type ValueType

type ValueType string
var (
	ValueTypeScalar ValueType = "scalar"
	ValueTypeArray  ValueType = "array"
	ValueTypeMap    ValueType = "map"
)

Jump to

Keyboard shortcuts

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