models

package
v0.0.0-...-0bea188 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name      string        `json:"name"`
	FormName  string        `json:"form_name"`
	FieldType FieldType     `json:"field_type"`
	Position  shapes.Point2 `json:"position"`
	Savable   bool          `json:"savable"` // only used with

	Content map[string]interface{} `json:"content"`
}

Field represents a field in a form

type FieldType

type FieldType uint

FieldType defines the type of the field

const (
	TextField FieldType = iota
	SelectionField
	MultiLinedTextField
)

FieldType enums

type Form

type Form struct {
	Name       string  `json:"name"`
	Fields     []Field `json:"fields"`
	B64FormImg string  `json:"form_img"`
}

Form represents a form :]

func (*Form) CopyForm

func (f *Form) CopyForm() Form

CopyForm returns a copy of the current form (to avoid pointers fuckery)

Jump to

Keyboard shortcuts

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