autoform

package
v0.4.6 Latest Latest
Warning

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

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

README

Autoform Dynamic Form

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeMaps added in v0.2.3

func MergeMaps[T any](map1, map2 map[string]T) map[string]T

Types

type ArrayField

type ArrayField struct {
	*BaseComponentField
}

func NewArrayField

func NewArrayField() *ArrayField

func (*ArrayField) Build

func (b *ArrayField) Build() *sdkcore.AutoFormSchema

func (*ArrayField) SetAllOf

func (b *ArrayField) SetAllOf(schemas []*sdkcore.AutoFormSchema) *ArrayField

func (*ArrayField) SetAnyOf

func (b *ArrayField) SetAnyOf(schemas []*sdkcore.AutoFormSchema) *ArrayField

func (*ArrayField) SetDefaultValue

func (b *ArrayField) SetDefaultValue(defaultValue interface{}) *ArrayField

func (*ArrayField) SetDescription

func (b *ArrayField) SetDescription(desc string) *ArrayField

rest

func (*ArrayField) SetDisabled

func (b *ArrayField) SetDisabled(disabled bool) *ArrayField

func (*ArrayField) SetDisplayName

func (b *ArrayField) SetDisplayName(title string) *ArrayField

func (*ArrayField) SetItems

func (b *ArrayField) SetItems(item *sdkcore.AutoFormSchema) *ArrayField

func (*ArrayField) SetOneOf

func (b *ArrayField) SetOneOf(schemas []*sdkcore.AutoFormSchema) *ArrayField

func (*ArrayField) SetRequired

func (b *ArrayField) SetRequired(required bool) *ArrayField

func (*ArrayField) SetUnique

func (b *ArrayField) SetUnique(unique bool) *ArrayField

type AuthSecretField

type AuthSecretField struct {
	*BaseComponentField
	// contains filtered or unexported fields
}

func NewAuthSecretField

func NewAuthSecretField() *AuthSecretField

func (*AuthSecretField) Build

func (*AuthSecretField) OverrideSecretField added in v0.2.3

func (b *AuthSecretField) OverrideSecretField(displayName *string, description *string) *AuthSecretField

func (*AuthSecretField) SetDescription

func (b *AuthSecretField) SetDescription(desc string) *AuthSecretField

func (*AuthSecretField) SetDisplayName

func (b *AuthSecretField) SetDisplayName(title string) *AuthSecretField

func (*AuthSecretField) WithKey added in v0.2.3

type BaseComponentField

type BaseComponentField struct {
	Required bool
	// contains filtered or unexported fields
}

func NewBaseComponentField

func NewBaseComponentField() *BaseComponentField

type BaseTextField

type BaseTextField struct {
	*BaseComponentField
}

BaseTextField is a type that represents a text field component in a form. It is a composition of BaseComponentField, and inherits its properties and methods. BaseTextField type has the following fields: - schema: AutoFormSchema - builder: *SchemaBuilder - Required: bool The methods available for BaseTextField type are: - Build(): AutoFormSchema - SetDescription(desc string) *SchemaBuilder - SetDisplayName(title string) *SchemaBuilder - SetRequired(required bool) *SchemaBuilder Example usage of BaseTextField: Create a new BaseTextField instance:

func newBaseTextField() *BaseTextField {
  c := &BaseTextField{
    BaseComponentField: NewBaseComponentFieldBuilder(),
  }
  c.builder.WithType(String)
  return c
}

Build the AutoFormSchema for BaseTextField:

func (b *BaseTextField) Build() AutoFormSchema {
  b.schema = b.builder.Build()
  return b.schema
}

Set a default value for BaseTextField:

func (b *BaseTextField) SetDefaultValue(defaultValue string) *SchemaBuilder {
  return b.builder.WithDefault(defaultValue)
}

Set the minimum length for BaseTextField:

func (b *BaseTextField) SetMinLength(len int) *SchemaBuilder {
  return b.builder.WithMinLength(&len)
}

Set the maximum length for BaseTextField:

func (b *BaseTextField) SetMaxLength(len int) *SchemaBuilder {
  return b.builder.WithMaxLength(&len)
}

BaseTextField can be extended by other types, such as ShortTextField, which embeds BaseTextField.

func (*BaseTextField) Build

func (b *BaseTextField) Build() *sdkcore.AutoFormSchema

func (*BaseTextField) SetAllOf

func (b *BaseTextField) SetAllOf(schemas []*sdkcore.AutoFormSchema) *BaseTextField

func (*BaseTextField) SetAnyOf

func (b *BaseTextField) SetAnyOf(schemas []*sdkcore.AutoFormSchema) *BaseTextField

func (*BaseTextField) SetDefaultValue

func (b *BaseTextField) SetDefaultValue(defaultValue string) *BaseTextField

func (*BaseTextField) SetDescription

func (b *BaseTextField) SetDescription(desc string) *BaseTextField

rest

func (*BaseTextField) SetDisabled

func (b *BaseTextField) SetDisabled(disabled bool) *BaseTextField

func (*BaseTextField) SetDisplayName

func (b *BaseTextField) SetDisplayName(title string) *BaseTextField

func (*BaseTextField) SetMaxLength

func (b *BaseTextField) SetMaxLength(len int) *BaseTextField

func (*BaseTextField) SetMinLength

func (b *BaseTextField) SetMinLength(len int) *BaseTextField

func (*BaseTextField) SetOneOf

func (b *BaseTextField) SetOneOf(schemas []*sdkcore.AutoFormSchema) *BaseTextField

func (*BaseTextField) SetRequired

func (b *BaseTextField) SetRequired(required bool) *BaseTextField

type BooleanField

type BooleanField struct {
	*BaseComponentField
}

func NewBooleanField

func NewBooleanField() *BooleanField

func (*BooleanField) Build

func (b *BooleanField) Build() *sdkcore.AutoFormSchema

func (*BooleanField) SetDefaultValue

func (b *BooleanField) SetDefaultValue(defaultValue bool) *BooleanField

func (*BooleanField) SetDescription

func (b *BooleanField) SetDescription(desc string) *BooleanField

func (*BooleanField) SetDisabled

func (b *BooleanField) SetDisabled(disabled bool) *BooleanField

func (*BooleanField) SetDisplayName

func (b *BooleanField) SetDisplayName(title string) *BooleanField

func (*BooleanField) SetRequired

func (b *BooleanField) SetRequired(required bool) *BooleanField

type BranchField

type BranchField struct {
	*BaseComponentField
}

func NewBranchField

func NewBranchField() *BranchField

func (*BranchField) Build

func (b *BranchField) Build() *sdkcore.AutoFormSchema

func (*BranchField) SetAllOf

func (b *BranchField) SetAllOf(schemas []*sdkcore.AutoFormSchema) *BranchField

func (*BranchField) SetAnyOf

func (b *BranchField) SetAnyOf(schemas []*sdkcore.AutoFormSchema) *BranchField

func (*BranchField) SetDefaultValue

func (b *BranchField) SetDefaultValue(defaultValue interface{}) *BranchField

func (*BranchField) SetDescription

func (b *BranchField) SetDescription(desc string) *BranchField

rest

func (*BranchField) SetDisabled

func (b *BranchField) SetDisabled(disabled bool) *BranchField

func (*BranchField) SetDisplayName

func (b *BranchField) SetDisplayName(title string) *BranchField

func (*BranchField) SetItems

func (b *BranchField) SetItems(item *sdkcore.AutoFormSchema) *BranchField

func (*BranchField) SetOneOf

func (b *BranchField) SetOneOf(schemas []*sdkcore.AutoFormSchema) *BranchField

func (*BranchField) SetRequired

func (b *BranchField) SetRequired(required bool) *BranchField

func (*BranchField) SetUnique

func (b *BranchField) SetUnique(unique bool) *BranchField

type CheckboxField

type CheckboxField struct {
	*BaseComponentField
}

func NewCheckboxField

func NewCheckboxField() *CheckboxField

func (*CheckboxField) Build

func (b *CheckboxField) Build() *sdkcore.AutoFormSchema

func (*CheckboxField) SetDefaultValue

func (b *CheckboxField) SetDefaultValue(defaultValue bool) *CheckboxField

func (*CheckboxField) SetDescription

func (b *CheckboxField) SetDescription(desc string) *CheckboxField

func (*CheckboxField) SetDisabled

func (b *CheckboxField) SetDisabled(disabled bool) *CheckboxField

func (*CheckboxField) SetDisplayName

func (b *CheckboxField) SetDisplayName(title string) *CheckboxField

func (*CheckboxField) SetRequired

func (b *CheckboxField) SetRequired(required bool) *CheckboxField

type CodeEditorField

type CodeEditorField struct {
	*BaseComponentField
	// contains filtered or unexported fields
}

func NewCodeEditorField

func NewCodeEditorField(language sdkcore.CodeEditorLanguage) *CodeEditorField

func (*CodeEditorField) Build

func (*CodeEditorField) SetDefaultValue

func (b *CodeEditorField) SetDefaultValue(defaultValue string) *CodeEditorField

func (*CodeEditorField) SetDescription

func (b *CodeEditorField) SetDescription(desc string) *CodeEditorField

func (*CodeEditorField) SetDisabled

func (b *CodeEditorField) SetDisabled(disabled bool) *CodeEditorField

func (*CodeEditorField) SetDisplayName

func (b *CodeEditorField) SetDisplayName(title string) *CodeEditorField

func (*CodeEditorField) SetRequired

func (b *CodeEditorField) SetRequired(required bool) *CodeEditorField

type CustomAuthField added in v0.2.3

type CustomAuthField struct {
	*BaseComponentField
	// contains filtered or unexported fields
}

func NewCustomAuthField added in v0.2.3

func NewCustomAuthField() *CustomAuthField

func (*CustomAuthField) Build added in v0.2.3

func (*CustomAuthField) SetDescription added in v0.2.3

func (b *CustomAuthField) SetDescription(desc string) *CustomAuthField

func (*CustomAuthField) SetFields added in v0.2.3

func (b *CustomAuthField) SetFields(fields map[string]*sdkcore.AutoFormSchema) *CustomAuthField

func (*CustomAuthField) SetRequired added in v0.2.3

func (b *CustomAuthField) SetRequired(required bool) *CustomAuthField

type DateTimeField

type DateTimeField struct {
	*BaseComponentField
}

func NewDateTimeField

func NewDateTimeField() *DateTimeField

func (*DateTimeField) Build

func (b *DateTimeField) Build() *sdkcore.AutoFormSchema

func (*DateTimeField) SetDefaultValue

func (b *DateTimeField) SetDefaultValue(defaultValue time.Time) *DateTimeField

func (*DateTimeField) SetDescription

func (b *DateTimeField) SetDescription(desc string) *DateTimeField

rest

func (*DateTimeField) SetDisabled

func (b *DateTimeField) SetDisabled(disabled bool) *DateTimeField

func (*DateTimeField) SetDisplayName

func (b *DateTimeField) SetDisplayName(title string) *DateTimeField

func (*DateTimeField) SetMaximum

func (b *DateTimeField) SetMaximum(len time.Time) *DateTimeField

func (*DateTimeField) SetMinimum

func (b *DateTimeField) SetMinimum(len time.Time) *DateTimeField

func (*DateTimeField) SetRequired

func (b *DateTimeField) SetRequired(required bool) *DateTimeField

type DefaultBaseComponentField

type DefaultBaseComponentField struct {
	Required bool
	// contains filtered or unexported fields
}

func NewDefaultBaseComponentField

func NewDefaultBaseComponentField() *DefaultBaseComponentField

func (*DefaultBaseComponentField) Build

func (*DefaultBaseComponentField) SetAllOf

func (*DefaultBaseComponentField) SetAnyOf

func (*DefaultBaseComponentField) SetDescription

func (*DefaultBaseComponentField) SetDisabled

func (b *DefaultBaseComponentField) SetDisabled(disabled bool) *DefaultBaseComponentField

func (*DefaultBaseComponentField) SetDisplayName

func (*DefaultBaseComponentField) SetOneOf

func (*DefaultBaseComponentField) SetRequired

func (b *DefaultBaseComponentField) SetRequired(required bool) *DefaultBaseComponentField

type DynamicField

type DynamicField struct {
	*BaseComponentField
	GetDynamicOptions *sdkcore.DynamicOptionsFn `json:"_,omitempty"`
}

func NewDynamicField

func NewDynamicField(schemaType sdkcore.AutoFormType) *DynamicField

func (*DynamicField) Build

func (b *DynamicField) Build() *sdkcore.AutoFormSchema

func (*DynamicField) SetAllOf

func (b *DynamicField) SetAllOf(schemas []*sdkcore.AutoFormSchema) *DynamicField

func (*DynamicField) SetAnyOf

func (b *DynamicField) SetAnyOf(schemas []*sdkcore.AutoFormSchema) *DynamicField

func (*DynamicField) SetDefaultValue

func (b *DynamicField) SetDefaultValue(defaultValue interface{}) *DynamicField

func (*DynamicField) SetDependsOn

func (b *DynamicField) SetDependsOn(deps []string) *DynamicField

func (*DynamicField) SetDescription

func (b *DynamicField) SetDescription(desc string) *DynamicField

rest

func (*DynamicField) SetDisabled

func (b *DynamicField) SetDisabled(disabled bool) *DynamicField

func (*DynamicField) SetDisplayName

func (b *DynamicField) SetDisplayName(title string) *DynamicField

func (*DynamicField) SetDynamicOptions

func (b *DynamicField) SetDynamicOptions(fn *sdkcore.DynamicOptionsFn) *DynamicField

func (*DynamicField) SetMaxLength

func (b *DynamicField) SetMaxLength(len int) *DynamicField

func (*DynamicField) SetMinLength

func (b *DynamicField) SetMinLength(len int) *DynamicField

func (*DynamicField) SetOneOf

func (b *DynamicField) SetOneOf(schemas []*sdkcore.AutoFormSchema) *DynamicField

func (*DynamicField) SetRequired

func (b *DynamicField) SetRequired(required bool) *DynamicField

type File

type File struct {
	// FileExtension: Output only. The final component of
	// `fullFileExtension`. This is only available for files with binary
	// content in Google Drive.
	Extension string `json:"extension,omitempty"`

	// FileExtension: Output only. The final component of
	// `fullFileExtension`. This is only available for files with binary
	// content in Google Drive.
	Mime string `json:"mime,omitempty"`

	// Name: The name of the file. This is not necessarily unique within a
	// folder. Note that for immutable items such as the top level folders
	// of shared drives, My Drive root folder, and Application Data folder
	// the name is constant.
	Name string `json:"name,omitempty"`

	// Size: Output only. Size in bytes of blobs and first party editor
	// files. Won't be populated for files that have no size, like shortcuts
	// and folders.
	Size int64 `json:"size,omitempty,string"`

	Data io.Reader `json:"data"`
}

type FileField

type FileField struct {
	*BaseComponentField
}

func NewFileField

func NewFileField() *FileField

func (*FileField) Build

func (b *FileField) Build() *sdkcore.AutoFormSchema

func (*FileField) SetDefaultValue

func (b *FileField) SetDefaultValue(defaultValue interface{}) *FileField

func (*FileField) SetDescription

func (b *FileField) SetDescription(desc string) *FileField

func (*FileField) SetDisabled

func (b *FileField) SetDisabled(disabled bool) *FileField

func (*FileField) SetDisplayName

func (b *FileField) SetDisplayName(title string) *FileField

func (*FileField) SetRequired

func (b *FileField) SetRequired(required bool) *FileField

type GroupArrayField

type GroupArrayField struct {
	*BaseComponentField
}

func NewGroupArrayField

func NewGroupArrayField() *GroupArrayField

func (*GroupArrayField) Build

func (*GroupArrayField) SetAllOf

func (b *GroupArrayField) SetAllOf(schemas []*sdkcore.AutoFormSchema) *GroupArrayField

func (*GroupArrayField) SetAnyOf

func (b *GroupArrayField) SetAnyOf(schemas []*sdkcore.AutoFormSchema) *GroupArrayField

func (*GroupArrayField) SetDefaultValue

func (b *GroupArrayField) SetDefaultValue(defaultValue interface{}) *GroupArrayField

func (*GroupArrayField) SetDescription

func (b *GroupArrayField) SetDescription(desc string) *GroupArrayField

rest

func (*GroupArrayField) SetDisabled

func (b *GroupArrayField) SetDisabled(disabled bool) *GroupArrayField

func (*GroupArrayField) SetDisplayName

func (b *GroupArrayField) SetDisplayName(title string) *GroupArrayField

func (*GroupArrayField) SetItems

func (*GroupArrayField) SetOneOf

func (b *GroupArrayField) SetOneOf(schemas []*sdkcore.AutoFormSchema) *GroupArrayField

func (*GroupArrayField) SetRequired

func (b *GroupArrayField) SetRequired(required bool) *GroupArrayField

func (*GroupArrayField) SetUnique

func (b *GroupArrayField) SetUnique(unique bool) *GroupArrayField

type InputMapField

type InputMapField struct {
	*BaseComponentField
}

func NewInputMapField

func NewInputMapField() *InputMapField

func (*InputMapField) Build

func (b *InputMapField) Build() *sdkcore.AutoFormSchema

func (*InputMapField) SetAllOf

func (b *InputMapField) SetAllOf(schemas []*sdkcore.AutoFormSchema) *InputMapField

func (*InputMapField) SetAnyOf

func (b *InputMapField) SetAnyOf(schemas []*sdkcore.AutoFormSchema) *InputMapField

func (*InputMapField) SetDisabled

func (b *InputMapField) SetDisabled(disabled bool) *InputMapField

func (*InputMapField) SetOneOf

func (b *InputMapField) SetOneOf(schemas []*sdkcore.AutoFormSchema) *InputMapField

func (*InputMapField) SetOrder

func (b *InputMapField) SetOrder(order []string) *InputMapField

func (*InputMapField) SetProperties

func (b *InputMapField) SetProperties(properties map[string]*sdkcore.AutoFormSchema) *InputMapField

func (*InputMapField) SetRequired

func (b *InputMapField) SetRequired(required bool) *InputMapField

type LongTextField

type LongTextField struct {
	*BaseTextField
}

LongTextField is a type that represents a long text field component in a form. It is an extension of BaseTextField, inheriting its properties and methods. LongTextField type does not have any additional fields or methods compared to BaseTextField.

func NewLongTextField

func NewLongTextField() *LongTextField

NewLongTextField creates a new instance of LongTextField. It initializes the BaseTextField using the newBaseTextField function and sets the AutoFormFieldType to LongTextType using the builder

type MarkdownField

type MarkdownField struct {
	*BaseTextField
}

func NewMarkdownField

func NewMarkdownField() *MarkdownField

type MultiSelectField

type MultiSelectField struct {
	*BaseComponentField
}

func NewMultiSelectField

func NewMultiSelectField() *MultiSelectField

func NewSelectField

func NewSelectField() *MultiSelectField

func (*MultiSelectField) Build

func (*MultiSelectField) SetDefaultValue

func (b *MultiSelectField) SetDefaultValue(defaultValue interface{}) *MultiSelectField

func (*MultiSelectField) SetDescription

func (b *MultiSelectField) SetDescription(desc string) *MultiSelectField

rest

func (*MultiSelectField) SetDisabled

func (b *MultiSelectField) SetDisabled(disabled bool) *MultiSelectField

func (*MultiSelectField) SetDisplayName

func (b *MultiSelectField) SetDisplayName(title string) *MultiSelectField

func (*MultiSelectField) SetOptions

func (b *MultiSelectField) SetOptions(schemas []*sdkcore.AutoFormSchema) *MultiSelectField

func (*MultiSelectField) SetRequired

func (b *MultiSelectField) SetRequired(required bool) *MultiSelectField

func (*MultiSelectField) SetUnique

func (b *MultiSelectField) SetUnique(unique bool) *MultiSelectField

type NumberField

type NumberField struct {
	*BaseComponentField
}

func NewNumberField

func NewNumberField() *NumberField

func (*NumberField) Build

func (b *NumberField) Build() *sdkcore.AutoFormSchema

func (*NumberField) SetAllOf

func (b *NumberField) SetAllOf(schemas []*sdkcore.AutoFormSchema) *NumberField

func (*NumberField) SetAnyOf

func (b *NumberField) SetAnyOf(schemas []*sdkcore.AutoFormSchema) *NumberField

func (*NumberField) SetDefaultValue

func (b *NumberField) SetDefaultValue(defaultValue interface{}) *NumberField

func (*NumberField) SetDescription

func (b *NumberField) SetDescription(desc string) *NumberField

rest

func (*NumberField) SetDisabled

func (b *NumberField) SetDisabled(disabled bool) *NumberField

func (*NumberField) SetDisplayName

func (b *NumberField) SetDisplayName(title string) *NumberField

func (*NumberField) SetMaximum

func (b *NumberField) SetMaximum(len int) *NumberField

func (*NumberField) SetMinimum

func (b *NumberField) SetMinimum(len int) *NumberField

func (*NumberField) SetOneOf

func (b *NumberField) SetOneOf(schemas []*sdkcore.AutoFormSchema) *NumberField

func (*NumberField) SetRequired

func (b *NumberField) SetRequired(required bool) *NumberField

type OAuthField

type OAuthField struct {
	*BaseComponentField
	// contains filtered or unexported fields
}

func NewOAuthField

func NewOAuthField(authURL string, tokenURL *string, scopes []string) *OAuthField

func (*OAuthField) Build

func (b *OAuthField) Build() *sdkcore.AutoFormSchema

func (*OAuthField) SetDescription

func (b *OAuthField) SetDescription(desc string) *OAuthField

func (*OAuthField) SetDisplayName

func (b *OAuthField) SetDisplayName(title string) *OAuthField

func (*OAuthField) SetExtraFields added in v0.2.3

func (b *OAuthField) SetExtraFields(fields map[string]*sdkcore.AutoFormSchema) *OAuthField

func (*OAuthField) SetRequired

func (b *OAuthField) SetRequired(required bool) *OAuthField

type ObjectField

type ObjectField struct {
	*BaseComponentField
}

func NewObjectField

func NewObjectField() *ObjectField

func (*ObjectField) Build

func (b *ObjectField) Build() *sdkcore.AutoFormSchema

func (*ObjectField) SetAllOf

func (b *ObjectField) SetAllOf(schemas []*sdkcore.AutoFormSchema) *ObjectField

func (*ObjectField) SetAnyOf

func (b *ObjectField) SetAnyOf(schemas []*sdkcore.AutoFormSchema) *ObjectField

func (*ObjectField) SetDefaultValue

func (b *ObjectField) SetDefaultValue(defaultValue interface{}) *ObjectField

func (*ObjectField) SetDescription

func (b *ObjectField) SetDescription(desc string) *ObjectField

func (*ObjectField) SetDisabled

func (b *ObjectField) SetDisabled(disabled bool) *ObjectField

func (*ObjectField) SetDisplayName

func (b *ObjectField) SetDisplayName(title string) *ObjectField

func (*ObjectField) SetOneOf

func (b *ObjectField) SetOneOf(schemas []*sdkcore.AutoFormSchema) *ObjectField

func (*ObjectField) SetOrder

func (b *ObjectField) SetOrder(order []string) *ObjectField

rest

func (*ObjectField) SetProperties

func (b *ObjectField) SetProperties(properties map[string]*sdkcore.AutoFormSchema) *ObjectField

func (*ObjectField) SetRequired

func (b *ObjectField) SetRequired(required bool) *ObjectField

type SchemaBuilder

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

func NewSchemaBuilder

func NewSchemaBuilder() *SchemaBuilder

func (*SchemaBuilder) Build

func (b *SchemaBuilder) Build() *sdkcore.AutoFormSchema

func (*SchemaBuilder) WithAdditionalItems

func (b *SchemaBuilder) WithAdditionalItems(additionalItems *sdkcore.AutoFormSchema) *SchemaBuilder

func (*SchemaBuilder) WithAllOf

func (b *SchemaBuilder) WithAllOf(allOf []*sdkcore.AutoFormSchema) *SchemaBuilder

func (*SchemaBuilder) WithAnyOf

func (b *SchemaBuilder) WithAnyOf(anyOf []*sdkcore.AutoFormSchema) *SchemaBuilder

func (*SchemaBuilder) WithConst

func (b *SchemaBuilder) WithConst(constant interface{}) *SchemaBuilder

func (*SchemaBuilder) WithDefault

func (b *SchemaBuilder) WithDefault(defaultValue interface{}) *SchemaBuilder

func (*SchemaBuilder) WithDependencies

func (b *SchemaBuilder) WithDependencies(dependencies map[string]interface{}) *SchemaBuilder

func (*SchemaBuilder) WithDescription

func (b *SchemaBuilder) WithDescription(description string) *SchemaBuilder

func (*SchemaBuilder) WithEnum

func (b *SchemaBuilder) WithEnum(enum []interface{}) *SchemaBuilder

func (*SchemaBuilder) WithExclusiveMaximum

func (b *SchemaBuilder) WithExclusiveMaximum(max interface{}) *SchemaBuilder

func (*SchemaBuilder) WithExclusiveMinimum

func (b *SchemaBuilder) WithExclusiveMinimum(min interface{}) *SchemaBuilder

func (*SchemaBuilder) WithFieldRequired

func (b *SchemaBuilder) WithFieldRequired(required bool) *SchemaBuilder

func (*SchemaBuilder) WithFieldType

func (b *SchemaBuilder) WithFieldType(fieldType sdkcore.AutoFormFieldType) *SchemaBuilder

func (*SchemaBuilder) WithFormat

func (b *SchemaBuilder) WithFormat(format string) *SchemaBuilder

func (*SchemaBuilder) WithID

func (b *SchemaBuilder) WithID(id string) *SchemaBuilder

func (*SchemaBuilder) WithItems

func (b *SchemaBuilder) WithItems(items *sdkcore.AutoFormSchema) *SchemaBuilder

func (*SchemaBuilder) WithMaxContains

func (b *SchemaBuilder) WithMaxContains(maxContains *int) *SchemaBuilder

func (*SchemaBuilder) WithMaxLength

func (b *SchemaBuilder) WithMaxLength(maxLength *int) *SchemaBuilder

func (*SchemaBuilder) WithMaximum

func (b *SchemaBuilder) WithMaximum(max interface{}) *SchemaBuilder

func (*SchemaBuilder) WithMinContains

func (b *SchemaBuilder) WithMinContains(minContains *int) *SchemaBuilder

func (*SchemaBuilder) WithMinLength

func (b *SchemaBuilder) WithMinLength(minLength *int) *SchemaBuilder

func (*SchemaBuilder) WithMinimum

func (b *SchemaBuilder) WithMinimum(min interface{}) *SchemaBuilder

func (*SchemaBuilder) WithNot

func (*SchemaBuilder) WithOneOf

func (b *SchemaBuilder) WithOneOf(oneOf []*sdkcore.AutoFormSchema) *SchemaBuilder

func (*SchemaBuilder) WithOrder

func (b *SchemaBuilder) WithOrder(order []string) *SchemaBuilder

func (*SchemaBuilder) WithPattern

func (b *SchemaBuilder) WithPattern(id string) *SchemaBuilder

func (*SchemaBuilder) WithPatternProperties

func (b *SchemaBuilder) WithPatternProperties(patternProperties map[string]*sdkcore.AutoFormSchema) *SchemaBuilder

func (*SchemaBuilder) WithProperties

func (b *SchemaBuilder) WithProperties(properties map[string]*sdkcore.AutoFormSchema) *SchemaBuilder

func (*SchemaBuilder) WithRequired

func (b *SchemaBuilder) WithRequired(required []string) *SchemaBuilder

func (*SchemaBuilder) WithSchema

func (b *SchemaBuilder) WithSchema(schema string) *SchemaBuilder

func (*SchemaBuilder) WithTitle

func (b *SchemaBuilder) WithTitle(title string) *SchemaBuilder

func (*SchemaBuilder) WithType

func (b *SchemaBuilder) WithType(schemaType sdkcore.AutoFormType) *SchemaBuilder

func (*SchemaBuilder) WithUniqueItems

func (b *SchemaBuilder) WithUniqueItems(uniqueItems bool) *SchemaBuilder

type SelectField

type SelectField struct {
	*BaseComponentField
}

func (*SelectField) Build

func (b *SelectField) Build() *sdkcore.AutoFormSchema

func (*SelectField) SetDefaultValue

func (b *SelectField) SetDefaultValue(defaultValue interface{}) *SelectField

func (*SelectField) SetDescription

func (b *SelectField) SetDescription(desc string) *SelectField

rest

func (*SelectField) SetDisabled

func (b *SelectField) SetDisabled(disabled bool) *SelectField

func (*SelectField) SetDisplayName

func (b *SelectField) SetDisplayName(title string) *SelectField

func (*SelectField) SetOptions

func (b *SelectField) SetOptions(schemas []*sdkcore.AutoFormSchema) *SelectField

func (*SelectField) SetRequired

func (b *SelectField) SetRequired(required bool) *SelectField

func (*SelectField) SetUnique

func (b *SelectField) SetUnique(unique bool) *SelectField

type ShortTextField

type ShortTextField struct {
	*BaseTextField
}

ShortTextField is a type that represents a short text field. It inherits from BaseTextField.

func NewShortTextField

func NewShortTextField() *ShortTextField

NewShortTextField creates a new instance of ShortTextField. It initializes the BaseTextField using the newBaseTextField function and sets the AutoFormFieldType to ShortTextType using the builder.

Jump to

Keyboard shortcuts

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