field

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	Type  string
	Id    string
	Value string
	Label string
	Name  string
}

func (*Button) Render

func (b *Button) Render(tplPath string, w io.Writer) error

type Checkbox

type Checkbox struct {
	Name     string
	Id       string
	Value    string
	Label    string
	Required bool
}

func (*Checkbox) Render

func (c *Checkbox) Render(tplPath string, w io.Writer) error

type DataList

type DataList struct {
	Id       string
	Name     string
	Label    string
	Type     string
	Required bool
	Size     int
	Multiple bool
	Options  []string
}

func (*DataList) Render

func (d *DataList) Render(tplPath string, w io.Writer) error

type Field

type Field interface {
	Render(string, io.Writer) error
}

type Input

type Input struct {
	Type         string
	Id           string
	Name         string
	Placeholder  string
	Value        string
	Label        string
	Required     bool
	ReadOnly     bool
	Disabled     bool
	Size         int
	MaxLength    int
	Min          string
	Max          string
	Pattern      string
	AutoFocus    bool
	AutoComplete bool
}

func (*Input) Render

func (i *Input) Render(tplPath string, w io.Writer) error

type RadioGroup

type RadioGroup struct {
	Name     string
	Label    string
	Required bool
	Values   []RadioValue
}

func (*RadioGroup) Render

func (r *RadioGroup) Render(tplPath string, w io.Writer) error

type RadioValue

type RadioValue struct {
	Id      string
	Value   string
	Label   string
	Checked bool
}

type Select

type Select struct {
	Id       string
	Name     string
	Label    string
	Required bool
	Size     int
	Multiple bool
	Options  []SelectOption
}

func (*Select) Render

func (s *Select) Render(tplPath string, w io.Writer) error

type SelectOption

type SelectOption struct {
	Value    string
	Label    string
	Selected bool
}

type TextArea

type TextArea struct {
	Id           string
	Name         string
	Placeholder  string
	Value        string
	Label        string
	Rows         int
	Cols         int
	MaxLength    int
	Required     bool
	ReadOnly     bool
	AutoFocus    bool
	AutoComplete bool
	Disabled     bool
}

func (*TextArea) Render

func (t *TextArea) Render(tplPath string, w io.Writer) error

Jump to

Keyboard shortcuts

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