form

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterViewsExtras

func RegisterViewsExtras(vx ViewsExtras)

RegisterViewsExtras регистрация новых параметров отображений

Types

type Field

type Field struct {
	Code     string         `json:"code"`
	Title    string         `json:"title"`
	Type     FieldType      `json:"type"`
	Multiple bool           `json:"multiple"`
	Sortable bool           `json:"sortable"`
	Extra    map[string]any `json:"extra"`
}

Field

type FieldType

type FieldType string

FieldType

const (
	None            FieldType = "none"
	Checkbox        FieldType = "checkbox"
	IntInput        FieldType = "intInput"
	UintInput       FieldType = "uintInput"
	FloatInput      FieldType = "floatInput"
	Rating          FieldType = "rating"
	Select          FieldType = "select"
	DatePickerInput FieldType = "datePickerInput"
	DateTimePicker  FieldType = "dateTimePicker"
	TimePicker      FieldType = "timePickerInput"
	Textarea        FieldType = "textarea"
	TextInput       FieldType = "textInput"
	Wysiwyg         FieldType = "wysiwyg"
	EditorJs        FieldType = "editorJs"
	Media           FieldType = "media"
	PhoneInput      FieldType = "phoneInput"
	EmailInput      FieldType = "emailInput"
	ColorsInput     FieldType = "colorsInput"
)

type Request

type Request struct {
	URI       string `json:"uri"`                 // URI относительный или полный путь
	Meth      string `json:"meth"`                // Meth метод http-запроса
	Service   string `json:"service,omitempty"`   // Service код сервиса, к которому идет запрос. Только для относительного URI
	Body      any    `json:"body,omitempty"`      // Body тело запроса
	Paginated bool   `json:"paginated,omitempty"` // Paginated нужно ли пагинировать запрос, пагинация передается в query параметрах запроса
}

Request объект описания запроса. Используется для описания запроса в полях типа Select, Media, EditorJs

type SelectData

type SelectData []struct {
	Label string `json:"label"`
	Value any    `json:"value"`
}

type ViewExtras

type ViewExtras map[string]any

ViewExtras параметры отображения

func ResolveViewExtras

func ResolveViewExtras(code string) ViewExtras

ResolveViewExtras получение параметров отображения

type ViewsExtras

type ViewsExtras map[string]ViewExtras

ViewsExtras параметры отображений

func (ViewsExtras) Resolve

func (ve ViewsExtras) Resolve(code string) ViewExtras

Resolve получение параметров отображения

Jump to

Keyboard shortcuts

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