Versions in this module Expand all Collapse all v0 v0.0.1 Nov 30, 2022 Changes in this version + const FieldTypeBool + const FieldTypeDate + const FieldTypeEmail + const FieldTypeFile + const FieldTypeJson + const FieldTypeNumber + const FieldTypeRelation + const FieldTypeSelect + const FieldTypeText + const FieldTypeUrl + const FieldTypeUser + const ReservedFieldNameCreated + const ReservedFieldNameId + const ReservedFieldNameUpdated + func ArraybleFieldTypes() []string + func FieldTypes() []string + func ReservedFieldNames() []string + type BoolOptions struct + func (o BoolOptions) Validate() error + type DateOptions struct + Max types.DateTime + Min types.DateTime + func (o DateOptions) Validate() error + type EmailOptions struct + ExceptDomains []string + OnlyDomains []string + func (o EmailOptions) Validate() error + type FieldOptions interface + Validate func() error + type FileOptions struct + MaxSelect int + MaxSize int + MimeTypes []string + Thumbs []string + func (o FileOptions) Validate() error + type JsonOptions struct + func (o JsonOptions) Validate() error + type NumberOptions struct + Max *float64 + Min *float64 + func (o NumberOptions) Validate() error + type RelationOptions struct + CascadeDelete bool + CollectionId string + MaxSelect int + func (o RelationOptions) Validate() error + type Schema struct + func NewSchema(fields ...*SchemaField) Schema + func (s *Schema) AddField(newField *SchemaField) + func (s *Schema) AsMap() map[string]*SchemaField + func (s *Schema) Clone() (*Schema, error) + func (s *Schema) Fields() []*SchemaField + func (s *Schema) GetFieldById(id string) *SchemaField + func (s *Schema) GetFieldByName(name string) *SchemaField + func (s *Schema) InitFieldsOptions() error + func (s *Schema) RemoveField(id string) + func (s *Schema) Scan(value any) error + func (s *Schema) UnmarshalJSON(data []byte) error + func (s Schema) MarshalJSON() ([]byte, error) + func (s Schema) Validate() error + func (s Schema) Value() (driver.Value, error) + type SchemaField struct + Id string + Name string + Options any + Required bool + System bool + Type string + Unique bool + func (f *SchemaField) ColDefinition() string + func (f *SchemaField) InitOptions() error + func (f *SchemaField) PrepareValue(value any) any + func (f *SchemaField) UnmarshalJSON(data []byte) error + func (f SchemaField) MarshalJSON() ([]byte, error) + func (f SchemaField) String() string + func (f SchemaField) Validate() error + type SelectOptions struct + MaxSelect int + Values []string + func (o SelectOptions) Validate() error + type TextOptions struct + Max *int + Min *int + Pattern string + func (o TextOptions) Validate() error + type UrlOptions struct + ExceptDomains []string + OnlyDomains []string + func (o UrlOptions) Validate() error + type UserOptions struct + CascadeDelete bool + MaxSelect int + func (o UserOptions) Validate() error