Documentation ¶
Index ¶
- Variables
- func MatchTypeProperty1[T any](t *TypeProperty, m TypePropertyMatch1[T]) (res T)
- type Builder
- func (b *Builder) Build() (*Schema, error)
- func (b *Builder) Fields(fields FieldList) *Builder
- func (b *Builder) ID(id ID) *Builder
- func (b *Builder) MustBuild() *Schema
- func (b *Builder) NewID() *Builder
- func (b *Builder) Project(project ProjectID) *Builder
- func (b *Builder) TitleField(fid *FieldID) *Builder
- func (b *Builder) Workspace(workspace accountdomain.WorkspaceID) *Builder
- type CorrespondingField
- type Field
- func (f *Field) Clone() *Field
- func (f *Field) CreatedAt() time.Time
- func (f *Field) DefaultValue() *value.Multiple
- func (f *Field) Description() string
- func (f *Field) ID() FieldID
- func (f *Field) IsGeometryField() bool
- func (f *Field) Key() id.Key
- func (f *Field) Multiple() bool
- func (f *Field) Name() string
- func (f *Field) Order() int
- func (f *Field) Required() bool
- func (f *Field) SetDefaultValue(v *value.Multiple) error
- func (f *Field) SetDescription(description string)
- func (f *Field) SetKey(key id.Key) error
- func (f *Field) SetMultiple(m bool)
- func (f *Field) SetName(name string)
- func (f *Field) SetOrder(o int)
- func (f *Field) SetRequired(req bool)
- func (f *Field) SetTypeProperty(tp *TypeProperty) error
- func (f *Field) SetUnique(unique bool)
- func (f *Field) SupportsPointField() bool
- func (f *Field) Type() value.Type
- func (f *Field) TypeProperty() *TypeProperty
- func (f *Field) Unique() bool
- func (f *Field) UpdatedAt() time.Time
- func (f *Field) Validate(m *value.Multiple) error
- func (f *Field) ValidateValue(m *value.Multiple) error
- type FieldAsset
- type FieldBool
- type FieldBuilder
- func (b *FieldBuilder) Build() (*Field, error)
- func (b *FieldBuilder) DefaultValue(v *value.Multiple) *FieldBuilder
- func (b *FieldBuilder) Description(description string) *FieldBuilder
- func (b *FieldBuilder) ID(id FieldID) *FieldBuilder
- func (b *FieldBuilder) Key(key id.Key) *FieldBuilder
- func (b *FieldBuilder) Multiple(multiple bool) *FieldBuilder
- func (b *FieldBuilder) MustBuild() *Field
- func (b *FieldBuilder) Name(name string) *FieldBuilder
- func (b *FieldBuilder) NewID() *FieldBuilder
- func (b *FieldBuilder) Order(o int) *FieldBuilder
- func (b *FieldBuilder) RandomKey() *FieldBuilder
- func (b *FieldBuilder) Required(required bool) *FieldBuilder
- func (b *FieldBuilder) Type(tp *TypeProperty) *FieldBuilder
- func (b *FieldBuilder) Unique(unique bool) *FieldBuilder
- func (b *FieldBuilder) UpdatedAt(t time.Time) *FieldBuilder
- type FieldCheckbox
- type FieldDateTime
- type FieldGeometryEditor
- func (f *FieldGeometryEditor) Clone() *FieldGeometryEditor
- func (f *FieldGeometryEditor) SupportedTypes() GeometryEditorSupportedTypeList
- func (f *FieldGeometryEditor) Type() value.Type
- func (f *FieldGeometryEditor) TypeProperty() *TypeProperty
- func (f *FieldGeometryEditor) Validate(v *value.Value) (err error)
- func (f *FieldGeometryEditor) ValidateMultiple(v *value.Multiple) (err error)
- type FieldGeometryObject
- func (f *FieldGeometryObject) Clone() *FieldGeometryObject
- func (f *FieldGeometryObject) SupportedTypes() GeometryObjectSupportedTypeList
- func (f *FieldGeometryObject) Type() value.Type
- func (f *FieldGeometryObject) TypeProperty() *TypeProperty
- func (f *FieldGeometryObject) Validate(v *value.Value) (err error)
- func (f *FieldGeometryObject) ValidateMultiple(v *value.Multiple) (err error)
- type FieldGroup
- type FieldID
- type FieldIDOrKey
- type FieldInteger
- func (f *FieldInteger) Clone() *FieldInteger
- func (f *FieldInteger) Max() *int64
- func (f *FieldInteger) Min() *int64
- func (f *FieldInteger) Type() value.Type
- func (f *FieldInteger) TypeProperty() *TypeProperty
- func (f *FieldInteger) Validate(v *value.Value) (err error)
- func (f *FieldInteger) ValidateMultiple(v *value.Multiple) error
- type FieldList
- type FieldMarkdown
- func (f *FieldMarkdown) Clone() *FieldMarkdown
- func (f *FieldMarkdown) MaxLength() *int
- func (f *FieldMarkdown) Type() value.Type
- func (f *FieldMarkdown) TypeProperty() *TypeProperty
- func (f *FieldMarkdown) Validate(v *value.Value) error
- func (f *FieldMarkdown) ValidateMultiple(v *value.Multiple) error
- type FieldNumber
- func (f *FieldNumber) Clone() *FieldNumber
- func (f *FieldNumber) Max() *float64
- func (f *FieldNumber) Min() *float64
- func (f *FieldNumber) Type() value.Type
- func (f *FieldNumber) TypeProperty() *TypeProperty
- func (f *FieldNumber) Validate(v *value.Value) (err error)
- func (f *FieldNumber) ValidateMultiple(v *value.Multiple) error
- type FieldReference
- func (f *FieldReference) Clone() *FieldReference
- func (f *FieldReference) CorrespondingField() *CorrespondingField
- func (f *FieldReference) CorrespondingFieldID() *id.FieldID
- func (f *FieldReference) IsTowWay() bool
- func (f *FieldReference) Model() model.ID
- func (f *FieldReference) Schema() id.SchemaID
- func (f *FieldReference) Type() value.Type
- func (f *FieldReference) TypeProperty() *TypeProperty
- func (f *FieldReference) Validate(v *value.Value) (err error)
- func (f *FieldReference) ValidateMultiple(_ *value.Multiple) error
- type FieldRichText
- func (f *FieldRichText) Clone() *FieldRichText
- func (f *FieldRichText) MaxLength() *int
- func (f *FieldRichText) Type() value.Type
- func (f *FieldRichText) TypeProperty() *TypeProperty
- func (f *FieldRichText) Validate(v *value.Value) error
- func (f *FieldRichText) ValidateMultiple(v *value.Multiple) error
- type FieldSelect
- type FieldString
- type FieldTag
- type FieldText
- type FieldTextArea
- func (f *FieldTextArea) Clone() *FieldTextArea
- func (f *FieldTextArea) MaxLength() *int
- func (f *FieldTextArea) Type() value.Type
- func (f *FieldTextArea) TypeProperty() *TypeProperty
- func (f *FieldTextArea) Validate(v *value.Value) error
- func (f *FieldTextArea) ValidateMultiple(v *value.Multiple) error
- type FieldURL
- type GeometryEditorSupportedType
- type GeometryEditorSupportedTypeList
- type GeometryObjectSupportedType
- type GeometryObjectSupportedTypeList
- type GroupID
- type GroupIDList
- type ID
- type IDList
- type List
- type Package
- func (p *Package) Field(fieldID id.FieldID) *Field
- func (p *Package) FieldByIDOrKey(fID *id.FieldID, k *id.Key) *Field
- func (p *Package) GroupSchema(gid id.GroupID) *Schema
- func (p *Package) GroupSchemas() List
- func (p *Package) MetaSchema() *Schema
- func (p *Package) ReferencedSchema(fieldID id.FieldID) *Schema
- func (p *Package) ReferencedSchemas() List
- func (p *Package) Schema() *Schema
- type ProjectID
- type Schema
- func (s *Schema) AddField(f *Field)
- func (s *Schema) Clone() *Schema
- func (s *Schema) Field(fId FieldID) *Field
- func (s *Schema) FieldByIDOrKey(fId *FieldID, key *id.Key) *Field
- func (s *Schema) Fields() FieldList
- func (s *Schema) FieldsByType(t value.Type) FieldList
- func (s *Schema) Groups() GroupIDList
- func (s *Schema) HasField(f FieldID) bool
- func (s *Schema) HasFieldByKey(k string) bool
- func (s *Schema) HasGeometryFields() bool
- func (s *Schema) ID() ID
- func (s *Schema) IsPointFieldSupported() bool
- func (s *Schema) Project() ProjectID
- func (s *Schema) ReferencedSchemas() IDList
- func (s *Schema) RemoveField(fid FieldID)
- func (s *Schema) SetTitleField(tf *FieldID) error
- func (s *Schema) SetWorkspace(workspace accountdomain.WorkspaceID)
- func (s *Schema) TitleField() *FieldID
- func (s *Schema) Workspace() accountdomain.WorkspaceID
- type Tag
- type TagColor
- type TagID
- type TagIDList
- type TagList
- type TypeProperty
- type TypePropertyMatch
- type TypePropertyMatch1
- type WorkspaceID
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFieldValues = rerror.NewE(i18n.T("invalid values")) ErrFieldDefaultValue = rerror.NewE(i18n.T("invalid default values")) )
View Source
var ErrDuplicatedTag = errors.New("duplicated tag")
View Source
var ErrInvalidFieldID = id.ErrInvalidID
View Source
var ErrInvalidID = id.ErrInvalidID
View Source
var ErrInvalidKey = rerror.NewE(i18n.T("invalid key"))
View Source
var (
ErrInvalidMinMax = rerror.NewE(i18n.T("max must be larger then min"))
)
View Source
var ErrInvalidTagID = id.ErrInvalidID
View Source
var ErrInvalidTitleField = errors.New("title field must be one of schema fields")
View Source
var ErrInvalidType = rerror.NewE(i18n.T("invalid type"))
View Source
var ErrInvalidValue = rerror.NewE(i18n.T("invalid value"))
View Source
var ErrUnsupportedType = rerror.NewE(i18n.T("unsupported geometry type"))
View Source
var ErrValueRequired = rerror.NewE(i18n.T("value is required"))
View Source
var FieldIDFrom = id.FieldIDFrom
View Source
var FieldIDFromRef = id.FieldIDFromRef
View Source
var IDFrom = id.SchemaIDFrom
View Source
var IDFromRef = id.SchemaIDFromRef
View Source
var IDListFrom = id.SchemaIDListFrom
View Source
var MustFieldID = id.MustFieldID
View Source
var MustID = id.MustSchemaID
View Source
var MustTagID = id.MustTagID
View Source
var NewFieldID = id.NewFieldID
View Source
var NewID = id.NewSchemaID
View Source
var NewTagID = id.NewTagID
View Source
var TagIDFrom = id.TagIDFrom
View Source
var TagIDFromRef = id.TagIDFromRef
Functions ¶
func MatchTypeProperty1 ¶
func MatchTypeProperty1[T any](t *TypeProperty, m TypePropertyMatch1[T]) (res T)
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) TitleField ¶
func (*Builder) Workspace ¶
func (b *Builder) Workspace(workspace accountdomain.WorkspaceID) *Builder
type CorrespondingField ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
func (*Field) DefaultValue ¶
func (*Field) Description ¶
func (*Field) IsGeometryField ¶
func (*Field) SetDescription ¶
func (*Field) SetMultiple ¶
func (*Field) SetRequired ¶
func (*Field) SetTypeProperty ¶
func (f *Field) SetTypeProperty(tp *TypeProperty) error
func (*Field) SupportsPointField ¶
func (*Field) TypeProperty ¶
func (f *Field) TypeProperty() *TypeProperty
type FieldAsset ¶
type FieldAsset struct { }
func NewAsset ¶
func NewAsset() *FieldAsset
func (*FieldAsset) Clone ¶
func (f *FieldAsset) Clone() *FieldAsset
func (*FieldAsset) Type ¶
func (f *FieldAsset) Type() value.Type
func (*FieldAsset) TypeProperty ¶
func (f *FieldAsset) TypeProperty() *TypeProperty
func (*FieldAsset) ValidateMultiple ¶
func (f *FieldAsset) ValidateMultiple(v *value.Multiple) error
type FieldBool ¶
type FieldBool struct { }
func (*FieldBool) TypeProperty ¶
func (f *FieldBool) TypeProperty() *TypeProperty
type FieldBuilder ¶
type FieldBuilder struct {
// contains filtered or unexported fields
}
func NewField ¶
func NewField(tp *TypeProperty) *FieldBuilder
func NewFieldWithDefaultProperty ¶
func NewFieldWithDefaultProperty(t value.Type) *FieldBuilder
func (*FieldBuilder) Build ¶
func (b *FieldBuilder) Build() (*Field, error)
func (*FieldBuilder) DefaultValue ¶
func (b *FieldBuilder) DefaultValue(v *value.Multiple) *FieldBuilder
func (*FieldBuilder) Description ¶
func (b *FieldBuilder) Description(description string) *FieldBuilder
func (*FieldBuilder) ID ¶
func (b *FieldBuilder) ID(id FieldID) *FieldBuilder
func (*FieldBuilder) Key ¶
func (b *FieldBuilder) Key(key id.Key) *FieldBuilder
func (*FieldBuilder) Multiple ¶
func (b *FieldBuilder) Multiple(multiple bool) *FieldBuilder
func (*FieldBuilder) MustBuild ¶
func (b *FieldBuilder) MustBuild() *Field
func (*FieldBuilder) Name ¶
func (b *FieldBuilder) Name(name string) *FieldBuilder
func (*FieldBuilder) NewID ¶
func (b *FieldBuilder) NewID() *FieldBuilder
func (*FieldBuilder) Order ¶
func (b *FieldBuilder) Order(o int) *FieldBuilder
func (*FieldBuilder) RandomKey ¶
func (b *FieldBuilder) RandomKey() *FieldBuilder
func (*FieldBuilder) Required ¶
func (b *FieldBuilder) Required(required bool) *FieldBuilder
func (*FieldBuilder) Type ¶
func (b *FieldBuilder) Type(tp *TypeProperty) *FieldBuilder
func (*FieldBuilder) Unique ¶
func (b *FieldBuilder) Unique(unique bool) *FieldBuilder
func (*FieldBuilder) UpdatedAt ¶
func (b *FieldBuilder) UpdatedAt(t time.Time) *FieldBuilder
type FieldCheckbox ¶
type FieldCheckbox struct { }
func NewCheckbox ¶
func NewCheckbox() *FieldCheckbox
func (*FieldCheckbox) Clone ¶
func (f *FieldCheckbox) Clone() *FieldCheckbox
func (*FieldCheckbox) Type ¶
func (f *FieldCheckbox) Type() value.Type
func (*FieldCheckbox) TypeProperty ¶
func (f *FieldCheckbox) TypeProperty() *TypeProperty
type FieldDateTime ¶
type FieldDateTime struct{}
func NewDateTime ¶
func NewDateTime() *FieldDateTime
func (*FieldDateTime) Clone ¶
func (f *FieldDateTime) Clone() *FieldDateTime
func (*FieldDateTime) Type ¶
func (f *FieldDateTime) Type() value.Type
func (*FieldDateTime) TypeProperty ¶
func (f *FieldDateTime) TypeProperty() *TypeProperty
func (*FieldDateTime) ValidateMultiple ¶
func (f *FieldDateTime) ValidateMultiple(v *value.Multiple) error
type FieldGeometryEditor ¶
type FieldGeometryEditor struct {
// contains filtered or unexported fields
}
func NewGeometryEditor ¶
func NewGeometryEditor(supportedTypes GeometryEditorSupportedTypeList) *FieldGeometryEditor
func (*FieldGeometryEditor) Clone ¶
func (f *FieldGeometryEditor) Clone() *FieldGeometryEditor
func (*FieldGeometryEditor) SupportedTypes ¶
func (f *FieldGeometryEditor) SupportedTypes() GeometryEditorSupportedTypeList
func (*FieldGeometryEditor) Type ¶
func (f *FieldGeometryEditor) Type() value.Type
func (*FieldGeometryEditor) TypeProperty ¶
func (f *FieldGeometryEditor) TypeProperty() *TypeProperty
func (*FieldGeometryEditor) Validate ¶
func (f *FieldGeometryEditor) Validate(v *value.Value) (err error)
func (*FieldGeometryEditor) ValidateMultiple ¶
func (f *FieldGeometryEditor) ValidateMultiple(v *value.Multiple) (err error)
type FieldGeometryObject ¶
type FieldGeometryObject struct {
// contains filtered or unexported fields
}
func NewGeometryObject ¶
func NewGeometryObject(supportedTypes GeometryObjectSupportedTypeList) *FieldGeometryObject
func (*FieldGeometryObject) Clone ¶
func (f *FieldGeometryObject) Clone() *FieldGeometryObject
func (*FieldGeometryObject) SupportedTypes ¶
func (f *FieldGeometryObject) SupportedTypes() GeometryObjectSupportedTypeList
func (*FieldGeometryObject) Type ¶
func (f *FieldGeometryObject) Type() value.Type
func (*FieldGeometryObject) TypeProperty ¶
func (f *FieldGeometryObject) TypeProperty() *TypeProperty
func (*FieldGeometryObject) Validate ¶
func (f *FieldGeometryObject) Validate(v *value.Value) (err error)
func (*FieldGeometryObject) ValidateMultiple ¶
func (f *FieldGeometryObject) ValidateMultiple(v *value.Multiple) (err error)
type FieldGroup ¶
type FieldGroup struct {
// contains filtered or unexported fields
}
func NewGroup ¶
func NewGroup(gid GroupID) *FieldGroup
func (*FieldGroup) Clone ¶
func (f *FieldGroup) Clone() *FieldGroup
func (*FieldGroup) Group ¶
func (f *FieldGroup) Group() GroupID
func (*FieldGroup) Type ¶
func (f *FieldGroup) Type() value.Type
func (*FieldGroup) TypeProperty ¶
func (f *FieldGroup) TypeProperty() *TypeProperty
func (*FieldGroup) ValidateMultiple ¶
func (f *FieldGroup) ValidateMultiple(v *value.Multiple) error
type FieldIDOrKey ¶
type FieldIDOrKey string
type FieldInteger ¶
type FieldInteger struct {
// contains filtered or unexported fields
}
func NewInteger ¶
func NewInteger(min, max *int64) (*FieldInteger, error)
func (*FieldInteger) Clone ¶
func (f *FieldInteger) Clone() *FieldInteger
func (*FieldInteger) Max ¶
func (f *FieldInteger) Max() *int64
func (*FieldInteger) Min ¶
func (f *FieldInteger) Min() *int64
func (*FieldInteger) Type ¶
func (f *FieldInteger) Type() value.Type
func (*FieldInteger) TypeProperty ¶
func (f *FieldInteger) TypeProperty() *TypeProperty
func (*FieldInteger) ValidateMultiple ¶
func (f *FieldInteger) ValidateMultiple(v *value.Multiple) error
type FieldList ¶
type FieldList []*Field
func (FieldList) IDs ¶
func (l FieldList) IDs() (ids id.FieldIDList)
type FieldMarkdown ¶
type FieldMarkdown struct {
// contains filtered or unexported fields
}
func NewMarkdown ¶
func NewMarkdown(maxLength *int) *FieldMarkdown
func (*FieldMarkdown) Clone ¶
func (f *FieldMarkdown) Clone() *FieldMarkdown
func (*FieldMarkdown) MaxLength ¶
func (f *FieldMarkdown) MaxLength() *int
func (*FieldMarkdown) Type ¶
func (f *FieldMarkdown) Type() value.Type
func (*FieldMarkdown) TypeProperty ¶
func (f *FieldMarkdown) TypeProperty() *TypeProperty
func (*FieldMarkdown) ValidateMultiple ¶
func (f *FieldMarkdown) ValidateMultiple(v *value.Multiple) error
type FieldNumber ¶
type FieldNumber struct {
// contains filtered or unexported fields
}
func NewNumber ¶
func NewNumber(min, max *float64) (*FieldNumber, error)
func (*FieldNumber) Clone ¶
func (f *FieldNumber) Clone() *FieldNumber
func (*FieldNumber) Max ¶
func (f *FieldNumber) Max() *float64
func (*FieldNumber) Min ¶
func (f *FieldNumber) Min() *float64
func (*FieldNumber) Type ¶
func (f *FieldNumber) Type() value.Type
func (*FieldNumber) TypeProperty ¶
func (f *FieldNumber) TypeProperty() *TypeProperty
func (*FieldNumber) ValidateMultiple ¶
func (f *FieldNumber) ValidateMultiple(v *value.Multiple) error
type FieldReference ¶
type FieldReference struct {
// contains filtered or unexported fields
}
func FieldReferenceFromTypeProperty ¶
func FieldReferenceFromTypeProperty(tp *TypeProperty) (*FieldReference, bool)
func NewReference ¶
func NewReference(mID id.ModelID, sID id.SchemaID, cfID *id.FieldID, cf *CorrespondingField) *FieldReference
func (*FieldReference) Clone ¶
func (f *FieldReference) Clone() *FieldReference
func (*FieldReference) CorrespondingField ¶
func (f *FieldReference) CorrespondingField() *CorrespondingField
CorrespondingField returns the corresponding field of this reference from user input. This is not stored in the database.
func (*FieldReference) CorrespondingFieldID ¶
func (f *FieldReference) CorrespondingFieldID() *id.FieldID
func (*FieldReference) IsTowWay ¶
func (f *FieldReference) IsTowWay() bool
func (*FieldReference) Model ¶
func (f *FieldReference) Model() model.ID
func (*FieldReference) Schema ¶
func (f *FieldReference) Schema() id.SchemaID
func (*FieldReference) Type ¶
func (f *FieldReference) Type() value.Type
func (*FieldReference) TypeProperty ¶
func (f *FieldReference) TypeProperty() *TypeProperty
func (*FieldReference) ValidateMultiple ¶
func (f *FieldReference) ValidateMultiple(_ *value.Multiple) error
type FieldRichText ¶
type FieldRichText struct {
// contains filtered or unexported fields
}
func NewRichText ¶
func NewRichText(maxLength *int) *FieldRichText
func (*FieldRichText) Clone ¶
func (f *FieldRichText) Clone() *FieldRichText
func (*FieldRichText) MaxLength ¶
func (f *FieldRichText) MaxLength() *int
func (*FieldRichText) Type ¶
func (f *FieldRichText) Type() value.Type
func (*FieldRichText) TypeProperty ¶
func (f *FieldRichText) TypeProperty() *TypeProperty
func (*FieldRichText) ValidateMultiple ¶
func (f *FieldRichText) ValidateMultiple(v *value.Multiple) error
type FieldSelect ¶
type FieldSelect struct {
// contains filtered or unexported fields
}
func NewSelect ¶
func NewSelect(values []string) *FieldSelect
func (*FieldSelect) Clone ¶
func (f *FieldSelect) Clone() *FieldSelect
func (*FieldSelect) Type ¶
func (*FieldSelect) Type() value.Type
func (*FieldSelect) TypeProperty ¶
func (f *FieldSelect) TypeProperty() *TypeProperty
func (*FieldSelect) ValidateMultiple ¶
func (f *FieldSelect) ValidateMultiple(v *value.Multiple) error
func (*FieldSelect) Values ¶
func (f *FieldSelect) Values() []string
type FieldString ¶
type FieldString struct {
// contains filtered or unexported fields
}
func (*FieldString) Clone ¶
func (f *FieldString) Clone() *FieldString
func (*FieldString) MaxLength ¶
func (f *FieldString) MaxLength() *int
func (*FieldString) Type ¶
func (f *FieldString) Type() value.Type
type FieldTag ¶
type FieldTag struct {
// contains filtered or unexported fields
}
func NewFieldTag ¶
func (*FieldTag) TypeProperty ¶
func (f *FieldTag) TypeProperty() *TypeProperty
type FieldText ¶
type FieldText struct {
// contains filtered or unexported fields
}
func (*FieldText) TypeProperty ¶
func (f *FieldText) TypeProperty() *TypeProperty
type FieldTextArea ¶
type FieldTextArea struct {
// contains filtered or unexported fields
}
func NewTextArea ¶
func NewTextArea(maxLength *int) *FieldTextArea
func (*FieldTextArea) Clone ¶
func (f *FieldTextArea) Clone() *FieldTextArea
func (*FieldTextArea) MaxLength ¶
func (f *FieldTextArea) MaxLength() *int
func (*FieldTextArea) Type ¶
func (f *FieldTextArea) Type() value.Type
func (*FieldTextArea) TypeProperty ¶
func (f *FieldTextArea) TypeProperty() *TypeProperty
func (*FieldTextArea) ValidateMultiple ¶
func (f *FieldTextArea) ValidateMultiple(v *value.Multiple) error
type FieldURL ¶
type FieldURL struct { }
func (*FieldURL) TypeProperty ¶
func (f *FieldURL) TypeProperty() *TypeProperty
type GeometryEditorSupportedType ¶
type GeometryEditorSupportedType string
const ( GeometryEditorSupportedTypePoint GeometryEditorSupportedType = "POINT" GeometryEditorSupportedTypeLineString GeometryEditorSupportedType = "LINESTRING" GeometryEditorSupportedTypePolygon GeometryEditorSupportedType = "POLYGON" GeometryEditorSupportedTypeAny GeometryEditorSupportedType = "ANY" )
func GeometryEditorSupportedTypeFrom ¶
func GeometryEditorSupportedTypeFrom(s string) GeometryEditorSupportedType
func (GeometryEditorSupportedType) String ¶
func (s GeometryEditorSupportedType) String() string
type GeometryEditorSupportedTypeList ¶
type GeometryEditorSupportedTypeList []GeometryEditorSupportedType
func (GeometryEditorSupportedTypeList) Has ¶
func (l GeometryEditorSupportedTypeList) Has(st GeometryEditorSupportedType) bool
type GeometryObjectSupportedType ¶
type GeometryObjectSupportedType string
const ( GeometryObjectSupportedTypePoint GeometryObjectSupportedType = "POINT" GeometryObjectSupportedTypeMultiPoint GeometryObjectSupportedType = "MULTIPOINT" GeometryObjectSupportedTypeLineString GeometryObjectSupportedType = "LINESTRING" GeometryObjectSupportedTypeMultiLineString GeometryObjectSupportedType = "MULTILINESTRING" GeometryObjectSupportedTypePolygon GeometryObjectSupportedType = "POLYGON" GeometryObjectSupportedTypeMultiPolygon GeometryObjectSupportedType = "MULTIPOLYGON" GeometryObjectSupportedTypeGeometryCollection GeometryObjectSupportedType = "GEOMETRYCOLLECTION" )
func GeometryObjectSupportedTypeFrom ¶
func GeometryObjectSupportedTypeFrom(s string) GeometryObjectSupportedType
func (GeometryObjectSupportedType) String ¶
func (s GeometryObjectSupportedType) String() string
type GeometryObjectSupportedTypeList ¶
type GeometryObjectSupportedTypeList []GeometryObjectSupportedType
func GeometryAllSupportedTypes ¶
func GeometryAllSupportedTypes() GeometryObjectSupportedTypeList
func (GeometryObjectSupportedTypeList) Has ¶
func (l GeometryObjectSupportedTypeList) Has(st GeometryObjectSupportedType) bool
type GroupIDList ¶
type GroupIDList = id.GroupIDList
type IDList ¶
type IDList = id.SchemaIDList
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
func NewPackage ¶
func (*Package) FieldByIDOrKey ¶
func (*Package) GroupSchemas ¶
func (*Package) MetaSchema ¶
func (*Package) ReferencedSchemas ¶
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
func (*Schema) Groups ¶
func (s *Schema) Groups() GroupIDList
func (*Schema) HasFieldByKey ¶
func (*Schema) HasGeometryFields ¶
func (*Schema) IsPointFieldSupported ¶
func (*Schema) ReferencedSchemas ¶
func (*Schema) RemoveField ¶
func (*Schema) SetTitleField ¶
func (*Schema) SetWorkspace ¶
func (s *Schema) SetWorkspace(workspace accountdomain.WorkspaceID)
func (*Schema) TitleField ¶
func (*Schema) Workspace ¶
func (s *Schema) Workspace() accountdomain.WorkspaceID
type TagColor ¶
type TagColor string
const ( TagColorMagenta TagColor = "magenta" TagColorRed TagColor = "red" TagColorVolcano TagColor = "volcano" TagColorOrange TagColor = "orange" TagColorGold TagColor = "gold" TagColorLime TagColor = "lime" TagColorGreen TagColor = "green" TagColorCyan TagColor = "cyan" TagColorBlue TagColor = "blue" TagColorGeekblue TagColor = "geekblue" TagColorPurple TagColor = "purple" )
func TagColorFrom ¶
type TypeProperty ¶
type TypeProperty struct {
// contains filtered or unexported fields
}
TypeProperty Represent special attributes for some field only one of the type properties should be not nil
func (*TypeProperty) Clone ¶
func (t *TypeProperty) Clone() *TypeProperty
func (*TypeProperty) Match ¶
func (t *TypeProperty) Match(m TypePropertyMatch)
func (*TypeProperty) Type ¶
func (t *TypeProperty) Type() value.Type
func (*TypeProperty) ValidateMultiple ¶
func (t *TypeProperty) ValidateMultiple(v *value.Multiple) error
type TypePropertyMatch ¶
type TypePropertyMatch struct { Text func(*FieldText) TextArea func(*FieldTextArea) RichText func(text *FieldRichText) Markdown func(*FieldMarkdown) Asset func(*FieldAsset) DateTime func(*FieldDateTime) Bool func(*FieldBool) Checkbox func(checkbox *FieldCheckbox) Select func(*FieldSelect) Tag func(*FieldTag) Integer func(*FieldInteger) Number func(*FieldNumber) Reference func(*FieldReference) URL func(*FieldURL) Group func(*FieldGroup) GeometryObject func(*FieldGeometryObject) GeometryEditor func(*FieldGeometryEditor) Default func() }
type TypePropertyMatch1 ¶
type TypePropertyMatch1[T any] struct { Text func(*FieldText) T TextArea func(*FieldTextArea) T RichText func(text *FieldRichText) T Markdown func(*FieldMarkdown) T Asset func(*FieldAsset) T DateTime func(*FieldDateTime) T Bool func(*FieldBool) T Checkbox func(checkbox *FieldCheckbox) T Select func(*FieldSelect) T Tag func(*FieldTag) T Integer func(*FieldInteger) T Number func(*FieldNumber) T Reference func(*FieldReference) T URL func(*FieldURL) T Group func(*FieldGroup) T GeometryObject func(*FieldGeometryObject) T GeometryEditor func(*FieldGeometryEditor) T Default func() T }
type WorkspaceID ¶
type WorkspaceID = id.WorkspaceID
Source Files ¶
- builder.go
- corresponding_field.go
- field.go
- field_asset.go
- field_bool.go
- field_builder.go
- field_checkbox.go
- field_datetime.go
- field_geometry_editor.go
- field_geometry_editor_supported_types.go
- field_geometry_object.go
- field_geometry_object_supported_types.go
- field_geometry_validation.go
- field_group.go
- field_integer.go
- field_markdown.go
- field_number.go
- field_reference.go
- field_richtext.go
- field_select.go
- field_string.go
- field_tag.go
- field_tag_color.go
- field_text.go
- field_textarea.go
- field_url.go
- id.go
- list.go
- package.go
- schema.go
- type_property.go
Click to show internal directories.
Click to hide internal directories.