property

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPropertyValue = errors.New("invalid property value")
	ErrCannotLinkDataset    = errors.New("cannot link dataset")
	ErrInvalidPropertyType  = errors.New("invalid property type")
	ErrInvalidPropertyField = errors.New("invalid property field")
)
View Source
var (
	ErrInvalidSceneID               = errors.New("invalid scene id")
	ErrInvalidPropertySchemaID      = errors.New("invalid property schema id")
	ErrInvalidValue                 = errors.New("invalid value")
	ErrInvalidPropertyLinkableField = errors.New("invalid property linkable field")
	ErrInvalidVersion               = errors.New("invalid version")
	ErrDuplicatedField              = errors.New("duplicated field")
)
View Source
var (
	ValueTypeUnknown      = ValueType(value.TypeUnknown)
	ValueTypeBool         = ValueType(value.TypeBool)
	ValueTypeNumber       = ValueType(value.TypeNumber)
	ValueTypeString       = ValueType(value.TypeString)
	ValueTypeRef          = ValueType(value.TypeRef)
	ValueTypeURL          = ValueType(value.TypeURL)
	ValueTypeLatLng       = ValueType(value.TypeLatLng)
	ValueTypeLatLngHeight = ValueType(value.TypeLatLngHeight)
	ValueTypeCoordinates  = ValueType(value.TypeCoordinates)
	ValueTypePolygon      = ValueType(value.TypePolygon)
	ValueTypeRect         = ValueType(value.TypeRect)
)
View Source
var DatasetFieldIDFrom = id.DatasetSchemaFieldIDFrom
View Source
var DatasetFieldIDFromRef = id.DatasetSchemaFieldIDFromRef
View Source
var DatasetFieldIDFromRefID = id.DatasetSchemaFieldIDFromRefID
View Source
var DatasetIDFrom = id.DatasetIDFrom
View Source
var DatasetIDFromRef = id.DatasetIDFromRef
View Source
var DatasetIDFromRefID = id.DatasetIDFromRefID
View Source
var DatasetSchemaIDFrom = id.DatasetSchemaIDFrom
View Source
var DatasetSchemaIDFromRef = id.DatasetSchemaIDFromRef
View Source
var DatasetSchemaIDFromRefID = id.DatasetSchemaIDFromRefID
View Source
var ErrInvalidID = id.ErrInvalidID
View Source
var ErrSchemaDoesNotMatch = errors.New("schema of the initializer does not match schema of the argument")
View Source
var IDFromRef = id.PropertyIDFromRef
View Source
var IDFromRefID = id.PropertyIDFromRefID
View Source
var ItemIDFrom = id.PropertyItemIDFrom
View Source
var ItemIDFromRef = id.PropertyItemIDFromRef
View Source
var ItemIDFromRefID = id.PropertyItemIDFromRefID
View Source
var MustDatasetFieldID = id.MustDatasetSchemaFieldID
View Source
var MustDatasetID = id.MustDatasetID
View Source
var MustDatasetSchemaID = id.MustDatasetSchemaID
View Source
var MustItemID = id.MustPropertyItemID
View Source
var MustSceneID = id.MustSceneID
View Source
var MustSchemaID = id.MustPropertySchemaID
View Source
var NewDatasetFieldID = id.NewDatasetSchemaFieldID
View Source
var NewDatasetID = id.NewDatasetID
View Source
var NewDatasetSchemaID = id.NewDatasetSchemaID
View Source
var NewItemID = id.NewPropertyItemID
View Source
var NewItemIDSet = id.NewPropertyItemIDSet
View Source
var NewSceneID = id.NewSceneID
View Source
var SceneIDFrom = id.SceneIDFrom
View Source
var SceneIDFromRef = id.SceneIDFromRef
View Source
var SceneIDFromRefID = id.SceneIDFromRefID
View Source
var SchemaGroupIDFrom = id.PropertySchemaGroupIDFrom
View Source
var SchemaIDFrom = id.PropertySchemaIDFrom
View Source
var SchemaIDFromRef = id.PropertySchemaIDFromRef
View Source
var ValueTypeCamera = ValueType("camera")
View Source
var ValueTypeTypography = ValueType("typography")

Functions

This section is empty.

Types

type Builder

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

func New

func New() *Builder

func (*Builder) Build

func (b *Builder) Build() (*Property, error)

func (*Builder) ID

func (b *Builder) ID(id ID) *Builder

func (*Builder) Items

func (b *Builder) Items(items []Item) *Builder

func (*Builder) MustBuild

func (b *Builder) MustBuild() *Property

func (*Builder) NewID

func (b *Builder) NewID() *Builder

func (*Builder) Scene

func (b *Builder) Scene(s SceneID) *Builder

func (*Builder) Schema

func (b *Builder) Schema(schema SchemaID) *Builder

type Camera

type Camera struct {
	Lat      float64 `json:"lat" mapstructure:"lat"`
	Lng      float64 `json:"lng" mapstructure:"lng"`
	Altitude float64 `json:"altitude" mapstructure:"altitude"`
	Heading  float64 `json:"heading" mapstructure:"heading"`
	Pitch    float64 `json:"pitch" mapstructure:"pitch"`
	Roll     float64 `json:"roll" mapstructure:"roll"`
	FOV      float64 `json:"fov" mapstructure:"fov"`
}

func (*Camera) Clone

func (c *Camera) Clone() *Camera

type Condition

type Condition struct {
	Field FieldID
	Value *Value
}

func (*Condition) Clone

func (c *Condition) Clone() *Condition

type Coordinates

type Coordinates = value.Coordinates

type DatasetFieldID added in v0.4.0

type DatasetFieldID = id.DatasetSchemaFieldID

type DatasetID added in v0.4.0

type DatasetID = id.DatasetID

type DatasetMigrationParam

type DatasetMigrationParam struct {
	OldDatasetSchemaMap map[DatasetSchemaID]DatasetSchemaID
	OldDatasetMap       map[DatasetID]DatasetID
	DatasetFieldIDMap   map[DatasetFieldID]DatasetFieldID
	NewDatasetSchemaMap map[DatasetSchemaID]*dataset.Schema
	NewDatasetMap       map[DatasetID]*dataset.Dataset
}

type DatasetSchemaID added in v0.4.0

type DatasetSchemaID = id.DatasetSchemaID

type Field

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

func (*Field) ActualValue

func (p *Field) ActualValue(ds *dataset.Dataset) *Value

func (*Field) Cast added in v0.4.0

func (p *Field) Cast(t ValueType)

func (*Field) Clone

func (p *Field) Clone() *Field

func (*Field) DatasetValue

func (p *Field) DatasetValue(ctx context.Context, d dataset.GraphLoader) (*dataset.Value, error)

func (*Field) Datasets added in v0.4.0

func (p *Field) Datasets() []DatasetID

func (*Field) Field

func (p *Field) Field() FieldID

func (*Field) IsDatasetLinked

func (p *Field) IsDatasetLinked(s DatasetSchemaID, i DatasetID) bool

func (*Field) IsEmpty

func (p *Field) IsEmpty() bool
func (p *Field) Link(links *Links)
func (p *Field) Links() *Links

func (*Field) MigrateDataset

func (p *Field) MigrateDataset(q DatasetMigrationParam)

func (*Field) MigrateSchema

func (p *Field) MigrateSchema(ctx context.Context, newSchema *Schema, dl dataset.Loader) bool

func (*Field) Type

func (p *Field) Type() ValueType
func (p *Field) Unlink()

func (*Field) Update

func (p *Field) Update(value *Value, field *SchemaField) error

func (*Field) UpdateField

func (p *Field) UpdateField(field FieldID)

func (*Field) UpdateUnsafe

func (p *Field) UpdateUnsafe(value *Value)

func (*Field) ValidateSchema

func (p *Field) ValidateSchema(ps *SchemaField) error

func (*Field) Value

func (p *Field) Value() *Value

type FieldBuilder

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

func FieldFrom added in v0.4.0

func FieldFrom(sf *SchemaField) *FieldBuilder

func NewField

func NewField(field FieldID) *FieldBuilder

func (*FieldBuilder) Build

func (b *FieldBuilder) Build() *Field

func (*FieldBuilder) Field added in v0.4.0

func (b *FieldBuilder) Field(field FieldID) *FieldBuilder
func (b *FieldBuilder) Links(l *Links) *FieldBuilder

func (*FieldBuilder) MustBuild

func (b *FieldBuilder) MustBuild() *Field

func (*FieldBuilder) Type added in v0.4.0

func (b *FieldBuilder) Type(t ValueType) *FieldBuilder

func (*FieldBuilder) Value

func (b *FieldBuilder) Value(v *OptionalValue) *FieldBuilder

type FieldID added in v0.4.0

type FieldID = id.PropertySchemaFieldID

type Group

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

Group represents a group of property

func InitGroupFrom

func InitGroupFrom(g *SchemaGroup) *Group

func ToGroup

func ToGroup(i Item) *Group

func (*Group) Datasets added in v0.4.0

func (g *Group) Datasets() []DatasetID

func (*Group) Field

func (g *Group) Field(fid FieldID) *Field

Field returns a field whose id is specified

func (*Group) FieldIDs

func (g *Group) FieldIDs() []FieldID

func (*Group) Fields

func (g *Group) Fields() []*Field

Fields returns a slice of fields

func (*Group) FieldsByLinkedDataset

func (g *Group) FieldsByLinkedDataset(s DatasetSchemaID, i DatasetID) []*Field

func (*Group) GetOrCreateField

func (g *Group) GetOrCreateField(ps *Schema, fid FieldID) (*Field, bool)

func (*Group) HasLinkedField

func (g *Group) HasLinkedField() bool

func (*Group) ID

func (g *Group) ID() ItemID

func (*Group) IDRef

func (g *Group) IDRef() *ItemID

func (*Group) IsDatasetLinked

func (g *Group) IsDatasetLinked(s DatasetSchemaID, i DatasetID) bool

func (*Group) IsEmpty

func (g *Group) IsEmpty() bool

func (*Group) MigrateDataset

func (g *Group) MigrateDataset(q DatasetMigrationParam)

func (*Group) MigrateSchema

func (g *Group) MigrateSchema(ctx context.Context, newSchema *Schema, dl dataset.Loader)

TODO: group migration

func (*Group) Prune

func (g *Group) Prune()

func (*Group) RemoveField

func (g *Group) RemoveField(fid FieldID)

func (*Group) RepresentativeField added in v0.4.0

func (g *Group) RepresentativeField(schema *Schema) *Field

func (*Group) SchemaGroup

func (g *Group) SchemaGroup() SchemaGroupID

func (*Group) SchemaGroupRef

func (g *Group) SchemaGroupRef() *SchemaGroupID

func (*Group) ValidateSchema

func (p *Group) ValidateSchema(ps *SchemaGroup) error

type GroupBuilder

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

func NewGroup

func NewGroup() *GroupBuilder

func (*GroupBuilder) Build

func (b *GroupBuilder) Build() (*Group, error)

func (*GroupBuilder) Fields

func (b *GroupBuilder) Fields(fields []*Field) *GroupBuilder

func (*GroupBuilder) ID

func (b *GroupBuilder) ID(id ItemID) *GroupBuilder

func (*GroupBuilder) MustBuild

func (b *GroupBuilder) MustBuild() *Group

func (*GroupBuilder) NewID

func (b *GroupBuilder) NewID() *GroupBuilder

func (*GroupBuilder) SchemaGroup added in v0.4.0

func (b *GroupBuilder) SchemaGroup(g SchemaGroupID) *GroupBuilder

type GroupList

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

func InitGroupListFrom

func InitGroupListFrom(g *SchemaGroup) *GroupList

func ToGroupList

func ToGroupList(i Item) *GroupList

func (*GroupList) Add

func (g *GroupList) Add(gg *Group, index int)

func (*GroupList) AddOrMove

func (g *GroupList) AddOrMove(gg *Group, index int)

func (*GroupList) Count

func (g *GroupList) Count() int

func (*GroupList) CreateAndAddListItem

func (g *GroupList) CreateAndAddListItem(ps *Schema, index *int) *Group

func (*GroupList) Datasets added in v0.4.0

func (g *GroupList) Datasets() []DatasetID

func (*GroupList) Empty

func (g *GroupList) Empty()

func (*GroupList) FieldsByLinkedDataset

func (g *GroupList) FieldsByLinkedDataset(s DatasetSchemaID, i DatasetID) []*Field

func (*GroupList) GetOrCreateField

func (g *GroupList) GetOrCreateField(ps *Schema, ptr *Pointer) (*Field, bool)

func (*GroupList) Group added in v0.4.0

func (g *GroupList) Group(gid ItemID) *Group

Group returns a group whose id is specified

func (*GroupList) GroupAt

func (g *GroupList) GroupAt(i int) *Group

GroupAt returns a group whose index is specified

func (*GroupList) Groups

func (g *GroupList) Groups() []*Group

Groups returns a slice of groups

func (*GroupList) Has

func (g *GroupList) Has(i ItemID) bool

func (*GroupList) HasLinkedField

func (g *GroupList) HasLinkedField() bool

func (*GroupList) ID

func (g *GroupList) ID() ItemID

ID returns id

func (*GroupList) IDRef

func (g *GroupList) IDRef() *ItemID

IDRef returns a reference of id

func (*GroupList) IsDatasetLinked

func (g *GroupList) IsDatasetLinked(s DatasetSchemaID, i DatasetID) bool

func (*GroupList) IsEmpty

func (g *GroupList) IsEmpty() bool

func (*GroupList) MigrateDataset

func (g *GroupList) MigrateDataset(q DatasetMigrationParam)

func (*GroupList) MigrateSchema

func (g *GroupList) MigrateSchema(ctx context.Context, newSchema *Schema, dl dataset.Loader)

func (*GroupList) Move

func (g *GroupList) Move(id ItemID, toIndex int)

func (*GroupList) MoveAt

func (g *GroupList) MoveAt(fromIndex int, toIndex int)

func (*GroupList) Prune

func (g *GroupList) Prune()

func (*GroupList) Remove

func (g *GroupList) Remove(id ItemID) bool

func (*GroupList) RemoveAt

func (g *GroupList) RemoveAt(index int)

func (*GroupList) SchemaGroup

func (g *GroupList) SchemaGroup() SchemaGroupID

SchemaGroup returns id of schema group

func (*GroupList) SchemaGroupRef

func (g *GroupList) SchemaGroupRef() *SchemaGroupID

func (*GroupList) ValidateSchema

func (p *GroupList) ValidateSchema(ps *SchemaGroup) error

type GroupListBuilder

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

func NewGroupList

func NewGroupList() *GroupListBuilder

func (*GroupListBuilder) Build

func (b *GroupListBuilder) Build() (*GroupList, error)

func (*GroupListBuilder) Groups

func (b *GroupListBuilder) Groups(fields []*Group) *GroupListBuilder

func (*GroupListBuilder) ID

func (*GroupListBuilder) MustBuild

func (b *GroupListBuilder) MustBuild() *GroupList

func (*GroupListBuilder) NewID

func (b *GroupListBuilder) NewID() *GroupListBuilder

func (*GroupListBuilder) SchemaGroup added in v0.4.0

func (b *GroupListBuilder) SchemaGroup(g SchemaGroupID) *GroupListBuilder

type ID added in v0.4.0

type ID = id.PropertyID

type IDSet added in v0.4.0

type IDSet = id.PropertyIDSet

type Initializer

type Initializer struct {
	ID     *ID                `json:"id"`
	Schema SchemaID           `json:"schema"`
	Items  []*InitializerItem `json:"items"`
}

func (*Initializer) Clone

func (p *Initializer) Clone() *Initializer

func (*Initializer) MustBeProperty

func (p *Initializer) MustBeProperty(scene SceneID) *Property

func (*Initializer) Property

func (p *Initializer) Property(scene SceneID) (*Property, error)

func (*Initializer) PropertyIncludingEmpty

func (p *Initializer) PropertyIncludingEmpty(scene SceneID, schema SchemaID) (*Property, error)

PropertyIncludingEmpty generates a new property, but even if the initializer is empty, an empty property will be generated.

type InitializerField

type InitializerField struct {
	Field FieldID            `json:"field"`
	Type  ValueType          `json:"type"`
	Value *Value             `json:"value"`
	Links []*InitializerLink `json:"links"`
}

func (*InitializerField) Clone

func (p *InitializerField) Clone() *InitializerField

func (*InitializerField) PropertyField

func (p *InitializerField) PropertyField() *Field

type InitializerGroup

type InitializerGroup struct {
	ID     *ItemID             `json:"id"`
	Fields []*InitializerField `json:"fields"`
}

func (*InitializerGroup) Clone

func (p *InitializerGroup) Clone() *InitializerGroup

func (*InitializerGroup) PropertyGroup

func (p *InitializerGroup) PropertyGroup(parentItem SchemaGroupID) (*Group, error)

type InitializerItem

type InitializerItem struct {
	ID         *ItemID             `json:"id"`
	SchemaItem SchemaGroupID       `json:"schemaItem"`
	Groups     []*InitializerGroup `json:"groups"`
	Fields     []*InitializerField `json:"fields"`
}

func (*InitializerItem) Clone

func (p *InitializerItem) Clone() *InitializerItem

func (*InitializerItem) PropertyGroup

func (p *InitializerItem) PropertyGroup() *Group

func (*InitializerItem) PropertyGroupList

func (p *InitializerItem) PropertyGroupList() *GroupList

func (*InitializerItem) PropertyItem

func (p *InitializerItem) PropertyItem() (Item, error)
type InitializerLink struct {
	Dataset *DatasetID      `json:"dataset"`
	Schema  DatasetSchemaID `json:"schema"`
	Field   DatasetFieldID  `json:"field"`
}

func (*InitializerLink) Clone

func (p *InitializerLink) Clone() *InitializerLink
func (p *InitializerLink) PropertyLink() *Link

type Item

type Item interface {
	ID() ItemID
	IDRef() *ItemID
	SchemaGroup() SchemaGroupID
	SchemaGroupRef() *SchemaGroupID
	HasLinkedField() bool
	Datasets() []DatasetID
	FieldsByLinkedDataset(DatasetSchemaID, DatasetID) []*Field
	IsDatasetLinked(DatasetSchemaID, DatasetID) bool
	IsEmpty() bool
	Prune()
	MigrateSchema(context.Context, *Schema, dataset.Loader)
	MigrateDataset(DatasetMigrationParam)
	ValidateSchema(*SchemaGroup) error
}

func InitItemFrom

func InitItemFrom(psg *SchemaGroup) Item

type ItemBuilder

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

func NewItem

func NewItem() *ItemBuilder

func (*ItemBuilder) Group

func (b *ItemBuilder) Group() *GroupBuilder

func (*ItemBuilder) GroupList

func (b *ItemBuilder) GroupList() *GroupListBuilder

func (*ItemBuilder) ID

func (b *ItemBuilder) ID(id ItemID) *ItemBuilder

func (*ItemBuilder) NewID

func (b *ItemBuilder) NewID() *ItemBuilder

func (*ItemBuilder) SchemaGroup added in v0.4.0

func (b *ItemBuilder) SchemaGroup(g SchemaGroupID) *ItemBuilder

type ItemID added in v0.4.0

type ItemID = id.PropertyItemID

type ItemIDSet added in v0.4.0

type ItemIDSet = id.PropertyItemIDSet

type LatLng

type LatLng = value.LatLng

type LatLngHeight

type LatLngHeight = value.LatLngHeight
type Link struct {
	// contains filtered or unexported fields
}
func NewLink(d DatasetID, ds DatasetSchemaID, f DatasetFieldID) *Link

func NewLinkFieldOnly

func NewLinkFieldOnly(ds DatasetSchemaID, f DatasetFieldID) *Link

func (*Link) ApplyDataset

func (l *Link) ApplyDataset(ds *DatasetID) *Link

func (*Link) Clone

func (l *Link) Clone() *Link

func (*Link) Dataset

func (l *Link) Dataset() *DatasetID

func (*Link) DatasetSchema

func (l *Link) DatasetSchema() *DatasetSchemaID

func (*Link) DatasetSchemaField

func (l *Link) DatasetSchemaField() *DatasetFieldID

func (*Link) Validate

func (l *Link) Validate(dss *dataset.Schema, ds *dataset.Dataset) bool

func (*Link) Value

func (l *Link) Value(ds *dataset.Dataset) *dataset.Value

type LinkableFields

type LinkableFields struct {
	LatLng *Pointer
	URL    *Pointer
}

func (LinkableFields) Clone

func (l LinkableFields) Clone() LinkableFields

func (LinkableFields) Validate

func (l LinkableFields) Validate(s *Schema) bool
type Links struct {
	// contains filtered or unexported fields
}
func NewLinks(links []*Link) *Links

func (*Links) ApplyDataset

func (l *Links) ApplyDataset(ds *DatasetID) *Links

func (*Links) Clone

func (l *Links) Clone() *Links

func (*Links) DatasetIDs

func (l *Links) DatasetIDs() []DatasetID

func (*Links) DatasetSchemaFieldIDs

func (l *Links) DatasetSchemaFieldIDs() []DatasetFieldID

func (*Links) DatasetSchemaIDs

func (l *Links) DatasetSchemaIDs() []DatasetSchemaID

func (*Links) DatasetValue

func (l *Links) DatasetValue(ctx context.Context, d dataset.GraphLoader) (*dataset.Value, error)

func (*Links) First

func (l *Links) First() *Link

func (*Links) HasDataset

func (l *Links) HasDataset(did DatasetID) bool

func (*Links) HasDatasetSchema

func (l *Links) HasDatasetSchema(dsid DatasetSchemaID) bool

func (*Links) HasDatasetSchemaAndDataset added in v0.4.0

func (l *Links) HasDatasetSchemaAndDataset(dsid DatasetSchemaID, did DatasetID) bool

func (*Links) HasSchemaAndDataset added in v0.4.0

func (l *Links) HasSchemaAndDataset(s DatasetSchemaID, dsid DatasetID) bool

func (*Links) IsEmpty

func (l *Links) IsEmpty() bool

func (*Links) IsLinked

func (l *Links) IsLinked() bool

func (*Links) IsLinkedFully

func (l *Links) IsLinkedFully() bool

func (*Links) Last

func (l *Links) Last() *Link

func (*Links) LastValue

func (l *Links) LastValue(ds *dataset.Dataset) *dataset.Value

func (*Links) Len

func (l *Links) Len() int
func (l *Links) Links() []*Link

func (*Links) Replace

func (l *Links) Replace(
	dsm map[DatasetSchemaID]DatasetSchemaID,
	dm map[DatasetID]DatasetID,
	fm map[DatasetFieldID]DatasetFieldID,
)

func (*Links) Validate

func (l *Links) Validate(dsm dataset.SchemaMap, dm dataset.Map) bool

type List

type List []*Property

func (List) IDs added in v0.4.0

func (l List) IDs() []ID

func (List) Map

func (l List) Map() Map

func (List) Schemas

func (l List) Schemas() []SchemaID

type Loader

type Loader func(context.Context, ...ID) (List, error)

func LoaderFrom

func LoaderFrom(data []*Property) Loader

func LoaderFromMap

func LoaderFromMap(data map[ID]*Property) Loader

type Map

type Map map[ID]*Property

func MapFrom

func MapFrom(properties ...*Property) Map

func (Map) Add

func (m Map) Add(properties ...*Property) Map

func (Map) Clone

func (m Map) Clone() Map

func (Map) Keys

func (m Map) Keys() []ID

func (Map) Len

func (m Map) Len() int

func (Map) List

func (m Map) List() List

func (Map) Merge

func (m Map) Merge(m2 Map) Map

type Merged

type Merged struct {
	Original      *ID
	Parent        *ID
	Schema        SchemaID
	LinkedDataset *DatasetID
	Groups        []*MergedGroup
}

Merged represents a merged property from two properties

func Merge

func Merge(o *Property, p *Property, linked *DatasetID) *Merged

Merge merges two properties

func (*Merged) Datasets

func (m *Merged) Datasets() []DatasetID

Datasets returns associated dataset IDs

type MergedField

type MergedField struct {
	ID         FieldID
	Type       ValueType
	Value      *Value
	Links      *Links
	Overridden bool
}

MergedField represents a field of Merged

func (*MergedField) DatasetValue

func (f *MergedField) DatasetValue(ctx context.Context, d dataset.GraphLoader) (*dataset.Value, error)

type MergedGroup

type MergedGroup struct {
	Original      *ItemID
	Parent        *ItemID
	SchemaGroup   SchemaGroupID
	LinkedDataset *DatasetID
	Groups        []*MergedGroup
	Fields        []*MergedField
}

MergedGroup represents a group of Merged

func (*MergedGroup) Datasets

func (m *MergedGroup) Datasets() []DatasetID

Datasets returns associated dataset IDs

type MergedMetadata

type MergedMetadata struct {
	Original      *ID
	Parent        *ID
	LinkedDataset *DatasetID
}

func MergedMetadataFrom

func MergedMetadataFrom(p ID) MergedMetadata

MergedMetadataFrom generates MergedMetadata from single property

func (MergedMetadata) Merge

func (m MergedMetadata) Merge(o *Property, p *Property) *Merged

Merge merges two properties

func (MergedMetadata) Properties

func (m MergedMetadata) Properties() []ID

Properties returns associated property IDs

type MigrationPlan added in v0.2.0

type MigrationPlan struct {
	From *Pointer
	To   *Pointer
}

type Migrator added in v0.2.0

type Migrator struct {
	NewSchema *Schema
	Plans     []MigrationPlan
}

type OptionalValue added in v0.3.0

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

func NewOptionalValue added in v0.3.0

func NewOptionalValue(t ValueType, v *Value) *OptionalValue

func OptionalValueFrom added in v0.3.0

func OptionalValueFrom(v *Value) *OptionalValue

func (*OptionalValue) Cast added in v0.3.0

func (ov *OptionalValue) Cast(t ValueType) *OptionalValue

func (*OptionalValue) Clone added in v0.3.0

func (ov *OptionalValue) Clone() *OptionalValue

func (*OptionalValue) SetValue added in v0.3.0

func (ov *OptionalValue) SetValue(v *Value)

func (*OptionalValue) Type added in v0.3.0

func (ov *OptionalValue) Type() ValueType

func (*OptionalValue) TypeAndValue added in v0.3.0

func (ov *OptionalValue) TypeAndValue() (ValueType, *Value)

func (*OptionalValue) Value added in v0.3.0

func (ov *OptionalValue) Value() *Value

type Pointer

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

Pointer is a pointer to a field and an item in properties and schemas

func NewPointer

func NewPointer(sg *SchemaGroupID, i *ItemID, f *FieldID) *Pointer

NewPointer creates a new Pointer.

func PointField

func PointField(sg *SchemaGroupID, i *ItemID, f FieldID) *Pointer

PointField creates a new Pointer pointing the field in properties.

func PointFieldByItem

func PointFieldByItem(i ItemID, f FieldID) *Pointer

PointFieldByItem creates a new Pointer pointing to the field of the item in properties.

func PointFieldBySchemaGroup

func PointFieldBySchemaGroup(sg SchemaGroupID, f FieldID) *Pointer

PointFieldBySchemaGroup creates a new Pointer pointing to the field of the schema field in properties.

func PointFieldOnly

func PointFieldOnly(fid FieldID) *Pointer

PointField creates a new Pointer pointing the field in property schemas.

func PointItem

func PointItem(i ItemID) *Pointer

PointItem creates a new Pointer pointing to the item in properties.

func PointItemBySchema

func PointItemBySchema(sg SchemaGroupID) *Pointer

PointItemBySchema creates a new Pointer pointing the schema item in property schemas.

func (*Pointer) Clone

func (p *Pointer) Clone() *Pointer

func (*Pointer) Field

func (p *Pointer) Field() (f FieldID, ok bool)

func (*Pointer) FieldByItem

func (p *Pointer) FieldByItem() (i ItemID, f FieldID, ok bool)

func (*Pointer) FieldBySchemaGroup

func (p *Pointer) FieldBySchemaGroup() (sg SchemaGroupID, f FieldID, ok bool)

func (*Pointer) FieldRef

func (p *Pointer) FieldRef() *FieldID

func (*Pointer) GetAll

func (p *Pointer) GetAll() (sg *SchemaGroupID, i *ItemID, f *FieldID)

func (*Pointer) Item

func (p *Pointer) Item() (i ItemID, ok bool)

func (*Pointer) ItemBySchemaGroup

func (p *Pointer) ItemBySchemaGroup() (i SchemaGroupID, ok bool)

func (*Pointer) ItemBySchemaGroupAndItem

func (p *Pointer) ItemBySchemaGroupAndItem() (i SchemaGroupID, i2 ItemID, ok bool)

func (*Pointer) ItemRef

func (p *Pointer) ItemRef() *ItemID

func (*Pointer) SchemaGroupAndItem

func (p *Pointer) SchemaGroupAndItem() (i SchemaGroupID, i2 ItemID, ok bool)

type Polygon

type Polygon = value.Polygon

type Property

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

func (*Property) AddListItem

func (p *Property) AddListItem(ps *Schema, ptr *Pointer, index *int) (*Group, *GroupList)

func (*Property) AutoLinkField

func (p *Property) AutoLinkField(s *Schema, v ValueType, d DatasetSchemaID, df *DatasetFieldID, ds *DatasetID)

func (*Property) Datasets added in v0.4.0

func (p *Property) Datasets() []DatasetID

func (*Property) Field

func (p *Property) Field(ptr *Pointer) (*Field, *GroupList, *Group)

func (*Property) FieldsByLinkedDataset

func (p *Property) FieldsByLinkedDataset(s DatasetSchemaID, i DatasetID) []*Field

func (*Property) GetOrCreateField

func (p *Property) GetOrCreateField(ps *Schema, ptr *Pointer) (*Field, *GroupList, *Group, bool)

func (*Property) GetOrCreateGroup

func (p *Property) GetOrCreateGroup(ps *Schema, ptr *Pointer) (*Group, *GroupList)

func (*Property) GetOrCreateGroupList

func (p *Property) GetOrCreateGroupList(ps *Schema, ptr *Pointer) *GroupList

func (*Property) GetOrCreateItem

func (p *Property) GetOrCreateItem(ps *Schema, ptr *Pointer) (Item, *GroupList)

func (*Property) GroupBySchema

func (p *Property) GroupBySchema(id SchemaGroupID) *Group

func (*Property) GroupListBySchema

func (p *Property) GroupListBySchema(id SchemaGroupID) *GroupList

func (*Property) HasLinkedField

func (p *Property) HasLinkedField() bool

func (*Property) ID

func (p *Property) ID() ID

func (*Property) IDRef

func (p *Property) IDRef() *ID

func (*Property) IsDatasetLinked

func (p *Property) IsDatasetLinked(s DatasetSchemaID, i DatasetID) bool

func (*Property) Item

func (p *Property) Item(id ItemID) (Item, *GroupList)

func (*Property) ItemByPointer

func (p *Property) ItemByPointer(ptr *Pointer) (Item, *GroupList)

func (*Property) ItemBySchema

func (p *Property) ItemBySchema(id SchemaGroupID) Item

ItemBySchema returns a root item by a schema group ID.

func (*Property) Items

func (p *Property) Items() []Item

func (*Property) ListItem

func (p *Property) ListItem(ptr *Pointer) (*Group, *GroupList)

func (*Property) MigrateDataset

func (p *Property) MigrateDataset(q DatasetMigrationParam)

func (*Property) MigrateSchema

func (p *Property) MigrateSchema(ctx context.Context, newSchema *Schema, dl dataset.Loader)

TODO: group migration

func (*Property) MoveListItem

func (p *Property) MoveListItem(ptr *Pointer, i int) (*Group, *GroupList)

func (*Property) Prune

func (p *Property) Prune()

func (*Property) RemoveField

func (p *Property) RemoveField(ptr *Pointer)

func (*Property) RemoveItem

func (p *Property) RemoveItem(ptr *Pointer)

func (*Property) RemoveListItem

func (p *Property) RemoveListItem(ptr *Pointer) bool

func (*Property) Scene

func (p *Property) Scene() SceneID

func (*Property) Schema

func (p *Property) Schema() SchemaID

func (*Property) UnlinkAllByDataset

func (p *Property) UnlinkAllByDataset(s DatasetSchemaID, ds DatasetID)

func (*Property) UpdateLinkableValue

func (p *Property) UpdateLinkableValue(s *Schema, v *Value)

func (*Property) UpdateValue

func (p *Property) UpdateValue(ps *Schema, ptr *Pointer, v *Value) (*Field, *GroupList, *Group, error)

func (*Property) ValidateSchema

func (p *Property) ValidateSchema(ps *Schema) error

type Rect

type Rect = value.Rect

type SceneID added in v0.4.0

type SceneID = id.SceneID

type Schema

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

func (*Schema) DetectDuplicatedFields

func (s *Schema) DetectDuplicatedFields() []FieldID

func (*Schema) Field

func (p *Schema) Field(id FieldID) *SchemaField

func (*Schema) FieldByPointer

func (p *Schema) FieldByPointer(ptr *Pointer) *SchemaField

func (*Schema) Fields

func (p *Schema) Fields() []*SchemaField

func (*Schema) Group

func (p *Schema) Group(id SchemaGroupID) *SchemaGroup

func (*Schema) GroupByField

func (p *Schema) GroupByField(id FieldID) *SchemaGroup

func (*Schema) GroupByPointer

func (p *Schema) GroupByPointer(ptr *Pointer) *SchemaGroup

func (*Schema) Groups

func (p *Schema) Groups() []*SchemaGroup

func (*Schema) ID

func (p *Schema) ID() SchemaID

func (*Schema) IDRef

func (p *Schema) IDRef() *SchemaID

func (*Schema) LinkableFields

func (p *Schema) LinkableFields() LinkableFields

func (*Schema) Version

func (p *Schema) Version() int

type SchemaBuilder

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

func NewSchema

func NewSchema() *SchemaBuilder

func (*SchemaBuilder) Build

func (b *SchemaBuilder) Build() (*Schema, error)

func (*SchemaBuilder) Groups

func (b *SchemaBuilder) Groups(groups []*SchemaGroup) *SchemaBuilder

func (*SchemaBuilder) ID

func (*SchemaBuilder) LinkableFields

func (b *SchemaBuilder) LinkableFields(l LinkableFields) *SchemaBuilder

func (*SchemaBuilder) MustBuild

func (b *SchemaBuilder) MustBuild() *Schema

func (*SchemaBuilder) Version

func (b *SchemaBuilder) Version(version int) *SchemaBuilder

type SchemaField

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

func (*SchemaField) Choice

func (p *SchemaField) Choice(key string) *SchemaFieldChoice

func (*SchemaField) Choices

func (p *SchemaField) Choices() []SchemaFieldChoice

func (*SchemaField) DefaultValue

func (p *SchemaField) DefaultValue() *Value

func (*SchemaField) Description

func (p *SchemaField) Description() i18n.String

func (*SchemaField) ID

func (p *SchemaField) ID() FieldID

func (*SchemaField) IsAvailableIf

func (p *SchemaField) IsAvailableIf() *Condition

func (*SchemaField) Max

func (p *SchemaField) Max() *float64

func (*SchemaField) Min

func (p *SchemaField) Min() *float64

func (*SchemaField) MinMax

func (p *SchemaField) MinMax() (*float64, *float64)

func (*SchemaField) Prefix

func (p *SchemaField) Prefix() string

func (*SchemaField) SetDescription

func (p *SchemaField) SetDescription(des i18n.String)

func (*SchemaField) SetTitle

func (p *SchemaField) SetTitle(title i18n.String)

func (*SchemaField) Suffix

func (p *SchemaField) Suffix() string

func (*SchemaField) Title

func (p *SchemaField) Title() i18n.String

func (*SchemaField) Type

func (p *SchemaField) Type() ValueType

func (*SchemaField) UI

func (p *SchemaField) UI() *SchemaFieldUI

func (*SchemaField) Validate

func (p *SchemaField) Validate(value *OptionalValue) bool

type SchemaFieldBuilder

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

func NewSchemaField

func NewSchemaField() *SchemaFieldBuilder

func (*SchemaFieldBuilder) Build

func (b *SchemaFieldBuilder) Build() (*SchemaField, error)

func (*SchemaFieldBuilder) Choices

func (*SchemaFieldBuilder) DefaultValue

func (b *SchemaFieldBuilder) DefaultValue(v *Value) *SchemaFieldBuilder

func (*SchemaFieldBuilder) Description

func (b *SchemaFieldBuilder) Description(description i18n.String) *SchemaFieldBuilder

func (*SchemaFieldBuilder) ID

func (*SchemaFieldBuilder) IsAvailableIf

func (b *SchemaFieldBuilder) IsAvailableIf(cond *Condition) *SchemaFieldBuilder

func (*SchemaFieldBuilder) Max

func (*SchemaFieldBuilder) MaxRef

func (*SchemaFieldBuilder) Min

func (*SchemaFieldBuilder) MinRef

func (*SchemaFieldBuilder) MustBuild

func (b *SchemaFieldBuilder) MustBuild() *SchemaField

func (*SchemaFieldBuilder) Name

func (*SchemaFieldBuilder) Prefix

func (b *SchemaFieldBuilder) Prefix(prefix string) *SchemaFieldBuilder

func (*SchemaFieldBuilder) Suffix

func (b *SchemaFieldBuilder) Suffix(suffix string) *SchemaFieldBuilder

func (*SchemaFieldBuilder) Type

func (b *SchemaFieldBuilder) Type(propertyType ValueType) *SchemaFieldBuilder

func (*SchemaFieldBuilder) UI

func (*SchemaFieldBuilder) UIRef

type SchemaFieldChoice

type SchemaFieldChoice struct {
	Key   string
	Title i18n.String
	Icon  string
}

func (SchemaFieldChoice) Copy

func (*SchemaFieldChoice) SetTitle

func (c *SchemaFieldChoice) SetTitle(l i18n.String)

type SchemaFieldUI

type SchemaFieldUI string
const (
	SchemaFieldUIMultiline  SchemaFieldUI = "multiline"
	SchemaFieldUISelection  SchemaFieldUI = "selection"
	SchemaFieldUIColor      SchemaFieldUI = "color"
	SchemaFieldUIRange      SchemaFieldUI = "range"
	SchemaFieldUIImage      SchemaFieldUI = "image"
	SchemaFieldUIVideo      SchemaFieldUI = "video"
	SchemaFieldUIFile       SchemaFieldUI = "file"
	SchemaFieldUILayer      SchemaFieldUI = "layer"
	SchemaFieldUICameraPose SchemaFieldUI = "camera_pose"
)

func SchemaFieldUIFrom

func SchemaFieldUIFrom(ui string) SchemaFieldUI

func SchemaFieldUIFromRef

func SchemaFieldUIFromRef(ui *string) *SchemaFieldUI

func (SchemaFieldUI) String

func (p SchemaFieldUI) String() string

func (*SchemaFieldUI) StringRef

func (p *SchemaFieldUI) StringRef() *string

type SchemaGroup

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

SchemaGroup represents a group of property that has some fields

func (*SchemaGroup) Field

func (s *SchemaGroup) Field(fid FieldID) *SchemaField

Field returns a field whose id is specified

func (*SchemaGroup) FieldByPointer

func (s *SchemaGroup) FieldByPointer(ptr *Pointer) *SchemaField

FieldByPointer returns a field whose id is specified

func (*SchemaGroup) Fields

func (s *SchemaGroup) Fields() []*SchemaField

Fields returns a slice of fields

func (*SchemaGroup) HasField

func (s *SchemaGroup) HasField(i FieldID) bool

func (*SchemaGroup) ID

func (s *SchemaGroup) ID() SchemaGroupID

ID returns id

func (*SchemaGroup) IDRef

func (s *SchemaGroup) IDRef() *SchemaGroupID

func (*SchemaGroup) IsAvailableIf

func (s *SchemaGroup) IsAvailableIf() *Condition

IsAvailableIf returns condition of availability

func (*SchemaGroup) IsList

func (s *SchemaGroup) IsList() bool

IsList returns true if this group is list

func (*SchemaGroup) RepresentativeField

func (s *SchemaGroup) RepresentativeField() *SchemaField

RepresentativeField returns the representative field of the group

func (*SchemaGroup) RepresentativeFieldID

func (s *SchemaGroup) RepresentativeFieldID() *FieldID

RepresentativeFieldID returns the representative field ID of the group

func (*SchemaGroup) SetTitle

func (s *SchemaGroup) SetTitle(t i18n.String)

func (*SchemaGroup) Title

func (s *SchemaGroup) Title() i18n.String

Title returns a title of the group

type SchemaGroupBuilder

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

func NewSchemaGroup

func NewSchemaGroup() *SchemaGroupBuilder

func (*SchemaGroupBuilder) Build

func (b *SchemaGroupBuilder) Build() (*SchemaGroup, error)

func (*SchemaGroupBuilder) Fields

func (b *SchemaGroupBuilder) Fields(fields []*SchemaField) *SchemaGroupBuilder

func (*SchemaGroupBuilder) ID

func (*SchemaGroupBuilder) IsAvailableIf

func (b *SchemaGroupBuilder) IsAvailableIf(cond *Condition) *SchemaGroupBuilder

func (*SchemaGroupBuilder) IsList

func (b *SchemaGroupBuilder) IsList(list bool) *SchemaGroupBuilder

func (*SchemaGroupBuilder) MustBuild

func (b *SchemaGroupBuilder) MustBuild() *SchemaGroup

func (*SchemaGroupBuilder) RepresentativeField

func (b *SchemaGroupBuilder) RepresentativeField(representativeField *FieldID) *SchemaGroupBuilder

func (*SchemaGroupBuilder) Title

type SchemaGroupID added in v0.4.0

type SchemaGroupID = id.PropertySchemaGroupID

type SchemaID added in v0.4.0

type SchemaID = id.PropertySchemaID

type SchemaList

type SchemaList []*Schema

func (SchemaList) Find added in v0.4.0

func (l SchemaList) Find(psid SchemaID) *Schema

func (SchemaList) Loader added in v0.4.0

func (l SchemaList) Loader() SchemaLoader

func (SchemaList) Map

func (l SchemaList) Map() SchemaMap

type SchemaLoader

type SchemaLoader func(context.Context, ...SchemaID) (SchemaList, error)

func SchemaLoaderFromMap added in v0.4.0

func SchemaLoaderFromMap(data map[SchemaID]*Schema) SchemaLoader

type SchemaMap

type SchemaMap map[SchemaID]*Schema

func SchemaMapFrom

func SchemaMapFrom(l []*Schema) SchemaMap

func (SchemaMap) Add

func (m SchemaMap) Add(schemas ...*Schema)

func (SchemaMap) Clone

func (m SchemaMap) Clone() SchemaMap

func (SchemaMap) List

func (m SchemaMap) List() SchemaList

func (SchemaMap) Loader added in v0.4.0

func (m SchemaMap) Loader() SchemaLoader

func (SchemaMap) Merge

func (m SchemaMap) Merge(m2 SchemaMap) SchemaMap

type Sealed

type Sealed struct {
	Original      *ID
	Parent        *ID
	Schema        SchemaID
	LinkedDataset *DatasetID
	Items         []*SealedItem
}

func Seal

func Seal(ctx context.Context, p *Merged, d dataset.GraphLoader) (*Sealed, error)

func SealProperty

func SealProperty(ctx context.Context, p *Property) *Sealed

func (*Sealed) Field

func (s *Sealed) Field(id FieldID) *SealedField

func (*Sealed) FieldBy

func (s *Sealed) FieldBy(ptr *Pointer) *SealedField

func (*Sealed) Interface

func (s *Sealed) Interface() map[string]interface{}

func (*Sealed) Item

func (s *Sealed) Item(i ItemID) *SealedItem

func (*Sealed) ItemBy

func (s *Sealed) ItemBy(ptr *Pointer) *SealedItem

func (*Sealed) ItemBySchemaGroup

func (s *Sealed) ItemBySchemaGroup(i SchemaGroupID) *SealedItem

type SealedField

type SealedField struct {
	ID  FieldID
	Val *ValueAndDatasetValue
}

func (*SealedField) Value added in v0.3.0

func (f *SealedField) Value() *Value

type SealedItem

type SealedItem struct {
	Original      *ItemID
	Parent        *ItemID
	SchemaGroup   SchemaGroupID
	LinkedDataset *DatasetID
	Fields        []*SealedField
	Groups        []*SealedItem
}

func (*SealedItem) Field

func (s *SealedItem) Field(id FieldID) *SealedField

func (*SealedItem) Group

func (s *SealedItem) Group(id ItemID) *SealedItem

func (*SealedItem) Interface

func (s *SealedItem) Interface() interface{}

func (*SealedItem) Match

func (s *SealedItem) Match(id ItemID) bool

type TextAlign

type TextAlign string
const (
	TextAlignLeft       TextAlign = "left"
	TextAlignCenter     TextAlign = "center"
	TextAlignRight      TextAlign = "right"
	TextAlignJustify    TextAlign = "justify"
	TextAlignJustifyAll TextAlign = "justify_all"
)

func TextAlignFrom

func TextAlignFrom(t string) (TextAlign, bool)

func TextAlignFromRef

func TextAlignFromRef(t *string) *TextAlign

func (TextAlign) String

func (t TextAlign) String() string

func (*TextAlign) StringRef

func (t *TextAlign) StringRef() *string

type Typography

type Typography struct {
	FontFamily *string    `json:"fontFamily" mapstructure:"fontFamily"`
	FontWeight *string    `json:"fontWeight" mapstructure:"fontWeight"`
	FontSize   *int       `json:"fontSize" mapstructure:"fontSize"`
	Color      *string    `json:"color" mapstructure:"color"`
	TextAlign  *TextAlign `json:"textAlign" mapstructure:"textAlign"`
	Bold       *bool      `json:"bold" mapstructure:"bold"`
	Italic     *bool      `json:"italic" mapstructure:"italic"`
	Underline  *bool      `json:"underline" mapstructure:"underline"`
}

func (*Typography) Clone

func (t *Typography) Clone() *Typography

type Validator

type Validator struct {
	SchemaLoader SchemaLoader
}

func (Validator) Validate

func (v Validator) Validate(ctx context.Context, properties List) error

type Value

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

func ValueFromStringOrNumber added in v0.3.0

func ValueFromStringOrNumber(s string) *Value

func (*Value) Cast added in v0.3.0

func (v *Value) Cast(vt ValueType) *Value

func (*Value) Clone

func (v *Value) Clone() *Value

func (*Value) Interface

func (v *Value) Interface() interface{}

func (*Value) IsEmpty

func (v *Value) IsEmpty() bool

func (*Value) Some added in v0.4.0

func (v *Value) Some() *OptionalValue

func (*Value) Type

func (v *Value) Type() ValueType

func (*Value) Value

func (v *Value) Value() interface{}

func (*Value) ValueBool

func (v *Value) ValueBool() *bool

func (*Value) ValueCamera

func (v *Value) ValueCamera() (vv Camera, ok bool)

func (*Value) ValueCoordinates

func (v *Value) ValueCoordinates() *Coordinates

func (*Value) ValueLatLng

func (v *Value) ValueLatLng() *LatLng

func (*Value) ValueLatLngHeight

func (v *Value) ValueLatLngHeight() *LatLngHeight

func (*Value) ValueNumber

func (v *Value) ValueNumber() *float64

func (*Value) ValuePolygon

func (v *Value) ValuePolygon() *Polygon

func (*Value) ValueRect

func (v *Value) ValueRect() *Rect

func (*Value) ValueRef

func (v *Value) ValueRef() *string

func (*Value) ValueString

func (v *Value) ValueString() *string

func (*Value) ValueTypography

func (v *Value) ValueTypography() (vv Typography, ok bool)

func (*Value) ValueURL

func (v *Value) ValueURL() *url.URL

type ValueAndDatasetValue added in v0.3.0

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

func NewValueAndDatasetValue added in v0.3.0

func NewValueAndDatasetValue(ty ValueType, d *dataset.Value, p *Value) *ValueAndDatasetValue

func (*ValueAndDatasetValue) DatasetValue added in v0.3.0

func (v *ValueAndDatasetValue) DatasetValue() *dataset.Value

func (*ValueAndDatasetValue) PropertyValue added in v0.3.0

func (v *ValueAndDatasetValue) PropertyValue() *Value

func (*ValueAndDatasetValue) Type added in v0.3.0

func (v *ValueAndDatasetValue) Type() ValueType

func (*ValueAndDatasetValue) Value added in v0.3.0

func (v *ValueAndDatasetValue) Value() *Value

type ValueType

type ValueType value.Type

func (ValueType) Default added in v0.4.0

func (t ValueType) Default() bool

func (ValueType) MustBeValue

func (vt ValueType) MustBeValue(i interface{}) *Value

func (ValueType) None added in v0.4.0

func (vt ValueType) None() *OptionalValue

func (ValueType) Valid added in v0.3.0

func (vt ValueType) Valid() bool

func (ValueType) ValueFrom

func (vt ValueType) ValueFrom(i interface{}) *Value

Jump to

Keyboard shortcuts

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