Documentation
¶
Index ¶
- Constants
- func FormShowErrorFn(err error) error
- func MenuShowErrorFn(err error) error
- func ValidateNoneEmptyString(val interface{}) error
- func ValidateNoneSpace(val interface{}) error
- type Bool
- func (c *Bool) Complete() error
- func (c *Bool) NewKindMeta() *Bool
- func (c *Bool) NewObjectMeta() *Bool
- func (c *Bool) Render(target interface{}) error
- func (c *Bool) SetDefault(value string) *Bool
- func (c *Bool) SetHelp(value string) *Bool
- func (c *Bool) SetKind(value string) *Bool
- func (c *Bool) SetMessage(value string) *Bool
- func (c *Bool) SetName(value string) *Bool
- func (c *Bool) SetRequired(value bool) *Bool
- type Editor
- func (e *Editor) Complete() error
- func (e *Editor) NewKindMeta() *Editor
- func (e *Editor) NewObjectMeta() *Editor
- func (e *Editor) Render(target interface{}) error
- func (e *Editor) SetDefault(value string) *Editor
- func (e *Editor) SetHelp(value string) *Editor
- func (e *Editor) SetKind(value string) *Editor
- func (e *Editor) SetMessage(value string) *Editor
- func (e *Editor) SetName(value string) *Editor
- func (e *Editor) SetPattern(value string) *Editor
- func (e *Editor) SetRequired(value bool) *Editor
- func (e *Editor) SetValidator(f func(val interface{}) error) *Editor
- type Form
- func (f *Form) AddItem(title interface{}, fn func() error) *Form
- func (f *Form) Render() error
- func (f *Form) SetOnCancelFn(fn func() error) *Form
- func (f *Form) SetOnDefaultFn(fn func() error) *Form
- func (f *Form) SetOnErrorFn(fn func(err error) error) *Form
- func (f *Form) SetOnSaveFn(fn func() error) *Form
- type Int
- func (i *Int) Complete() error
- func (i *Int) NewKindMeta() *Int
- func (i *Int) NewObjectMeta() *Int
- func (i *Int) Render(target interface{}) error
- func (i *Int) SetDefault(value string) *Int
- func (i *Int) SetHelp(value string) *Int
- func (i *Int) SetInvalidOptions(value []string) *Int
- func (i *Int) SetInvalidOptionsMessage(value string) *Int
- func (i *Int) SetKind(value string) *Int
- func (i *Int) SetMessage(value string) *Int
- func (i *Int) SetName(value string) *Int
- func (i *Int) SetRange(min, max int) *Int
- func (i *Int) SetRequired(value bool) *Int
- func (i *Int) SetValidator(f func(val interface{}) error) *Int
- type KindMeta
- type List
- func (l *List) Complete() error
- func (l *List) NewKindMeta() *List
- func (l *List) NewObjectMeta() *List
- func (l *List) Render(target interface{}) error
- func (l *List) SetDefault(value string) *List
- func (l *List) SetHelp(value string) *List
- func (l *List) SetKind(value string) *List
- func (l *List) SetMessage(value string) *List
- func (l *List) SetName(value string) *List
- func (l *List) SetOptions(value []string) *List
- func (l *List) SetPageSize(value int) *List
- func (l *List) SetRequired(value bool) *List
- func (l *List) SetValidator(f func(val interface{}) error) *List
- type ListSelector
- type Menu
- type MultiSelectMenu
- type Multiline
- func (e *Multiline) Complete() error
- func (e *Multiline) NewKindMeta() *Multiline
- func (e *Multiline) NewObjectMeta() *Multiline
- func (e *Multiline) Render(target interface{}) error
- func (e *Multiline) SetDefault(value string) *Multiline
- func (e *Multiline) SetHelp(value string) *Multiline
- func (e *Multiline) SetKind(value string) *Multiline
- func (e *Multiline) SetMessage(value string) *Multiline
- func (e *Multiline) SetName(value string) *Multiline
- func (e *Multiline) SetRequired(value bool) *Multiline
- func (e *Multiline) SetValidator(f func(val interface{}) error) *Multiline
- type ObjectMeta
- type Question
- type Selector
- type String
- func (s *String) Complete() error
- func (s *String) NewKindMeta() *String
- func (s *String) NewObjectMeta() *String
- func (s *String) Render(target interface{}) error
- func (s *String) SetDefault(value string) *String
- func (s *String) SetHelp(value string) *String
- func (s *String) SetInvalidOptions(value []string) *String
- func (s *String) SetInvalidOptionsMessage(value string) *String
- func (s *String) SetKeepFilter(value bool) *String
- func (s *String) SetKind(value string) *String
- func (s *String) SetMessage(value string) *String
- func (s *String) SetName(value string) *String
- func (s *String) SetOptions(value []string) *String
- func (s *String) SetPageSize(value int) *String
- func (s *String) SetRequired(value bool) *String
- func (s *String) SetValidator(f func(val interface{}) error) *String
Constants ¶
View Source
const ( FormSave = "<save>" FormCancel = "<cancel>" FormDefaults = "<defaults>" )
Variables ¶
This section is empty.
Functions ¶
func FormShowErrorFn ¶ added in v0.4.1
func MenuShowErrorFn ¶ added in v0.4.0
func ValidateNoneEmptyString ¶ added in v0.3.1
func ValidateNoneEmptyString(val interface{}) error
func ValidateNoneSpace ¶ added in v0.3.1
func ValidateNoneSpace(val interface{}) error
Types ¶
type Bool ¶
type Bool struct { *KindMeta *ObjectMeta // contains filtered or unexported fields }
func (*Bool) NewKindMeta ¶
func (*Bool) NewObjectMeta ¶
func (*Bool) SetDefault ¶
func (*Bool) SetMessage ¶
func (*Bool) SetRequired ¶
type Editor ¶
type Editor struct { *KindMeta *ObjectMeta Pattern string // contains filtered or unexported fields }
func (*Editor) NewKindMeta ¶
func (*Editor) NewObjectMeta ¶
func (*Editor) SetDefault ¶
func (*Editor) SetMessage ¶
func (*Editor) SetPattern ¶
func (*Editor) SetRequired ¶
func (*Editor) SetValidator ¶
type Form ¶ added in v0.4.1
type Form struct {
// contains filtered or unexported fields
}
func (*Form) SetOnCancelFn ¶ added in v0.4.1
func (*Form) SetOnDefaultFn ¶ added in v0.4.1
func (*Form) SetOnErrorFn ¶ added in v0.4.1
func (*Form) SetOnSaveFn ¶ added in v0.4.1
type Int ¶
type Int struct { *KindMeta *ObjectMeta InvalidOptions []string InvalidOptionsMessage string Range bool Min int Max int // contains filtered or unexported fields }
func (*Int) NewKindMeta ¶
func (*Int) NewObjectMeta ¶
func (*Int) SetDefault ¶
func (*Int) SetInvalidOptions ¶
func (*Int) SetInvalidOptionsMessage ¶
func (*Int) SetMessage ¶
func (*Int) SetRequired ¶
func (*Int) SetValidator ¶
type KindMeta ¶
type KindMeta struct { Kind string `json:"kind"` // contains filtered or unexported fields }
func NewKindMeta ¶
func NewKindMeta() *KindMeta
type List ¶
type List struct { *KindMeta *ObjectMeta Options []string // contains filtered or unexported fields }
func (*List) NewKindMeta ¶
func (*List) NewObjectMeta ¶
func (*List) SetDefault ¶
func (*List) SetMessage ¶
func (*List) SetOptions ¶
func (*List) SetPageSize ¶ added in v0.5.1
func (*List) SetRequired ¶
func (*List) SetValidator ¶
type ListSelector ¶ added in v0.4.0
type ListSelector struct {
// contains filtered or unexported fields
}
func NewListSelector ¶ added in v0.4.0
func NewListSelector(title string) *ListSelector
func (*ListSelector) AddItems ¶ added in v0.4.0
func (ls *ListSelector) AddItems(items ...Selector) *ListSelector
func (*ListSelector) Render ¶ added in v0.4.0
func (ls *ListSelector) Render() (Selector, error)
type Menu ¶ added in v0.4.0
type Menu struct {
// contains filtered or unexported fields
}
func (*Menu) SetBackOption ¶ added in v0.4.0
func (*Menu) SetDisableLoop ¶ added in v0.4.0
type MultiSelectMenu ¶ added in v0.5.1
type MultiSelectMenu struct {
// contains filtered or unexported fields
}
func NewMultiSelectMenu ¶ added in v0.5.1
func NewMultiSelectMenu(title string) *MultiSelectMenu
func (*MultiSelectMenu) AddItem ¶ added in v0.5.1
func (m *MultiSelectMenu) AddItem(title string, fn func() error) *MultiSelectMenu
func (*MultiSelectMenu) Render ¶ added in v0.5.1
func (m *MultiSelectMenu) Render() error
func (*MultiSelectMenu) SetErrorHandler ¶ added in v0.5.1
func (m *MultiSelectMenu) SetErrorHandler(value func(err error) error) *MultiSelectMenu
type Multiline ¶
type Multiline struct { *KindMeta *ObjectMeta // contains filtered or unexported fields }
func NewMultiline ¶
func NewMultiline() *Multiline
func (*Multiline) NewKindMeta ¶
func (*Multiline) NewObjectMeta ¶
func (*Multiline) SetDefault ¶
func (*Multiline) SetMessage ¶
func (*Multiline) SetRequired ¶
func (*Multiline) SetValidator ¶
type ObjectMeta ¶
type ObjectMeta struct { Name string `json:"name"` Message string `json:"message"` Default string `json:"default"` Help string `json:"help"` Required bool `json:"required"` // contains filtered or unexported fields }
func NewObjectMeta ¶
func NewObjectMeta() *ObjectMeta
func (*ObjectMeta) SetDefault ¶
func (o *ObjectMeta) SetDefault(value string) *ObjectMeta
func (*ObjectMeta) SetHelp ¶
func (o *ObjectMeta) SetHelp(value string) *ObjectMeta
func (*ObjectMeta) SetMessage ¶
func (o *ObjectMeta) SetMessage(value string) *ObjectMeta
func (*ObjectMeta) SetName ¶
func (o *ObjectMeta) SetName(value string) *ObjectMeta
func (*ObjectMeta) SetRequired ¶
func (o *ObjectMeta) SetRequired(value bool) *ObjectMeta
type String ¶
type String struct { *KindMeta *ObjectMeta Options []string InvalidOptions []string InvalidOptionsMessage string // contains filtered or unexported fields }
func (*String) NewKindMeta ¶
func (*String) NewObjectMeta ¶
func (*String) SetDefault ¶
func (*String) SetInvalidOptions ¶
func (*String) SetInvalidOptionsMessage ¶
func (*String) SetKeepFilter ¶ added in v0.4.0
func (*String) SetMessage ¶
func (*String) SetOptions ¶
func (*String) SetPageSize ¶ added in v0.4.0
func (*String) SetRequired ¶
func (*String) SetValidator ¶
Click to show internal directories.
Click to hide internal directories.