component

package
v0.0.0-...-b4c633b Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeInfo    = "info"
	MessageTypeError   = "error"
	MessageTypeWarning = "warning"
)
View Source
const (
	TypeScript      = "script"
	TypeSetEnv      = "set_env"
	TypeShellScript = "shell_script"
	TypeK8sTunnel   = "kubectl_tunnel"
	TypeSSHTunnel   = "ssh_tunnel"
)

Variables

This section is empty.

Functions

func Message

func Message(gtx layout.Context, messageType string, theme *chapartheme.Theme, message string) layout.Dimensions

Types

type AddressBar

type AddressBar struct {
	// contains filtered or unexported fields
}

func NewAddressBar

func NewAddressBar(theme *chapartheme.Theme, address, method string) *AddressBar

func (*AddressBar) Layout

func (a *AddressBar) Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions

func (*AddressBar) SetOnMethodChanged

func (a *AddressBar) SetOnMethodChanged(onMethodChanged func(method string))

func (*AddressBar) SetOnSubmit

func (a *AddressBar) SetOnSubmit(onSubmit func())

func (*AddressBar) SetOnURLChanged

func (a *AddressBar) SetOnURLChanged(onURLChanged func(url string))

func (*AddressBar) SetSelectedMethod

func (a *AddressBar) SetSelectedMethod(method string)

func (*AddressBar) SetURL

func (a *AddressBar) SetURL(url string)

type BinaryFile

type BinaryFile struct {
	FileName string
	// contains filtered or unexported fields
}

func NewBinaryFile

func NewBinaryFile(Filename string) *BinaryFile

func (*BinaryFile) GetFilePath

func (b *BinaryFile) GetFilePath() string

func (*BinaryFile) Layout

func (b *BinaryFile) Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions

func (*BinaryFile) RemoveFile

func (b *BinaryFile) RemoveFile()

func (*BinaryFile) SetFileName

func (b *BinaryFile) SetFileName(name string)

func (*BinaryFile) SetOnChanged

func (b *BinaryFile) SetOnChanged(f func(filePath string))

func (*BinaryFile) SetOnSelectFile

func (b *BinaryFile) SetOnSelectFile(f func())
type Breadcrumb struct {
	ID             string
	ContainerType  string
	CollectionName string
	Title          *widgets.EditableLabel

	SaveButton widget.Clickable
	// contains filtered or unexported fields
}

func NewBreadcrumb

func NewBreadcrumb(id, name, cType, title string) *Breadcrumb
func (b *Breadcrumb) Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions
func (b *Breadcrumb) SetContainerType(cType string)
func (b *Breadcrumb) SetDataChanged(changed bool)
func (b *Breadcrumb) SetOnSave(f func(id string))
func (b *Breadcrumb) SetOnTitleChanged(f func(title string))

type Field

type Field struct {
	Label string
	Value string

	Editor *widget.Editor
}

type Form

type Form struct {
	Fields []*Field
	// contains filtered or unexported fields
}

func NewForm

func NewForm(fields []*Field) *Form

func (*Form) GetValues

func (f *Form) GetValues() map[string]string

func (*Form) Layout

func (f *Form) Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions

func (*Form) SetOnChange

func (f *Form) SetOnChange(onChange func(values map[string]string))

func (*Form) SetValues

func (f *Form) SetValues(values map[string]string)

type FormData

type FormData struct {
	Fields []*FormDataField
	// contains filtered or unexported fields
}

func NewFormData

func NewFormData(theme *chapartheme.Theme, fields ...*FormDataField) *FormData

func (*FormData) AddFile

func (f *FormData) AddFile(id string, file string)

func (*FormData) GetValues

func (f *FormData) GetValues() []domain.FormField

func (*FormData) Layout

func (f *FormData) Layout(gtx layout.Context, title, hint string, theme *chapartheme.Theme) layout.Dimensions

func (*FormData) SetOnChanged

func (f *FormData) SetOnChanged(fn func(values []domain.FormField))

func (*FormData) SetOnSelectFile

func (f *FormData) SetOnSelectFile(fn func(id string))

func (*FormData) SetValues

func (f *FormData) SetValues(values []domain.FormField)

type FormDataField

type FormDataField struct {
	Type       string
	Identifier string
	Key        string
	Value      string
	Files      []string
	Enable     bool
	// contains filtered or unexported fields
}

func NewFormDataField

func NewFormDataField(t FormDataFieldType, key, value string, files []string) *FormDataField

type FormDataFieldType

type FormDataFieldType string
const (
	FormDataFieldTypeText FormDataFieldType = "text"
	FormDataFieldTypeFile FormDataFieldType = "file"
)

type KeyValue

type KeyValue struct {
	Key   string
	Value string
	// contains filtered or unexported fields
}

type Option

type Option struct {
	Title string
	Value string
	Type  string
	Hint  string
}

type PrePostRequest

type PrePostRequest struct {
	// contains filtered or unexported fields
}

func NewPrePostRequest

func NewPrePostRequest(options []Option, theme *chapartheme.Theme) *PrePostRequest

func (*PrePostRequest) Layout

func (*PrePostRequest) SetCode

func (p *PrePostRequest) SetCode(code string)

func (*PrePostRequest) SetEnvForm

func (p *PrePostRequest) SetEnvForm(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions

func (*PrePostRequest) SetOnDropDownChanged

func (p *PrePostRequest) SetOnDropDownChanged(f func(selected string))

func (*PrePostRequest) SetOnPostRequestSetChanged

func (p *PrePostRequest) SetOnPostRequestSetChanged(f func(item, from, fromKey string))

func (*PrePostRequest) SetOnScriptChanged

func (p *PrePostRequest) SetOnScriptChanged(f func(script string))

func (*PrePostRequest) SetPostRequestSetValues

func (p *PrePostRequest) SetPostRequestSetValues(set domain.PostRequestSet)

func (*PrePostRequest) SetPreview

func (p *PrePostRequest) SetPreview(preview string)

func (*PrePostRequest) SetSelectedDropDown

func (p *PrePostRequest) SetSelectedDropDown(selected string)

type SetEnvForm

type SetEnvForm struct {
	// contains filtered or unexported fields
}

type ValuesTable

type ValuesTable struct {
	Title  string
	Values []KeyValue
	// contains filtered or unexported fields
}

func NewValuesTable

func NewValuesTable(Title string, values []KeyValue) *ValuesTable

func (*ValuesTable) GetData

func (v *ValuesTable) GetData() []domain.KeyValue

func (*ValuesTable) Layout

func (v *ValuesTable) Layout(gtx layout.Context, theme *chapartheme.Theme) layout.Dimensions

func (*ValuesTable) SetData

func (v *ValuesTable) SetData(values []domain.KeyValue)

Jump to

Keyboard shortcuts

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