types

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: GPL-3.0 Imports: 2 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options added in v0.0.2

type Options map[string]any

func (Options) Bool added in v0.0.2

func (o Options) Bool(name string, def bool) bool

func (Options) Float64 added in v0.0.2

func (o Options) Float64(name string, def float64) float64

func (Options) Int added in v0.0.2

func (o Options) Int(name string, def int) int

func (Options) Int64 added in v0.0.2

func (o Options) Int64(name string, def int64) int64

type SmartField

type SmartField struct {
	Key         string              `json:"key"`
	Label       string              `json:"label"`
	Type        string              `json:"type,omitempty"` //type object array
	Default     any                 `json:"default,omitempty"`
	Placeholder string              `json:"placeholder,omitempty"`
	Tips        string              `json:"tips,omitempty"`
	Pattern     string              `json:"pattern,omitempty"`
	Options     []SmartSelectOption `json:"options,omitempty"`
	Required    bool                `json:"required,omitempty"`
	Min         float64             `json:"min,omitempty"`
	Max         float64             `json:"max,omitempty"`
	Step        float64             `json:"step,omitempty"`

	Children []SmartField `json:"children,omitempty"` //子级?
}

type SmartSelectOption

type SmartSelectOption struct {
	Value    any    `json:"value"`
	Label    string `json:"label"`
	Disabled bool   `json:"disabled,omitempty"`
}

type Time

type Time time.Time

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

func (*Time) MarshalText

func (t *Time) MarshalText() ([]byte, error)

func (*Time) Now

func (t *Time) Now() Time

func (*Time) ParseTime

func (t *Time) ParseTime(tm time.Time) Time

func (*Time) String

func (t *Time) String() string

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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