tui

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusMsgError   StatusMsgType = iota
	StatusMsgSuccess StatusMsgType = iota

	StatusTypeOK    StatusType = iota
	StatusTypeWarn  StatusType = iota
	StatusTypeError StatusType = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Back

type Back struct{}

type BindingsGetter

type BindingsGetter interface {
	Bindings() []key.Binding
}

type ChosenMethod

type ChosenMethod struct {
	Method string
}

type ChosenService

type ChosenService struct {
	Service string
}

type ClearStatusMsg

type ClearStatusMsg struct{}

type Commands

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

func NewCommands

func NewCommands(grpc *grpc.Wrapper, store *store.Store) *Commands

func (*Commands) Back added in v0.0.3

func (c *Commands) Back() tea.Cmd

func (*Commands) ClearStatusMsg

func (c *Commands) ClearStatusMsg() tea.Cmd

func (*Commands) LoadMethodMetadata added in v0.0.3

func (c *Commands) LoadMethodMetadata(method string) tea.Cmd

func (*Commands) LoadMethods

func (c *Commands) LoadMethods(service string) tea.Cmd

func (*Commands) LoadServices

func (c *Commands) LoadServices() tea.Cmd

func (*Commands) ResendRequest added in v0.0.3

func (c *Commands) ResendRequest() tea.Cmd

func (*Commands) SendRequest

func (c *Commands) SendRequest(method string, payload string) tea.Cmd

func (*Commands) SetStatus

func (c *Commands) SetStatus(status string, st StatusType) tea.Cmd

func (*Commands) SetStatusLoading added in v0.0.3

func (c *Commands) SetStatusLoading() tea.Cmd

func (*Commands) SetStatusMessage

func (c *Commands) SetStatusMessage(msg string, st StatusMsgType) tea.Cmd

func (*Commands) SetStatusOK added in v0.0.3

func (c *Commands) SetStatusOK() tea.Cmd

type Err

type Err struct {
	Error error
}

type HelpView

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

func NewHelpView

func NewHelpView(bindings BindingsGetter) HelpView

func (*HelpView) SetWidth

func (h *HelpView) SetWidth(width int)

func (*HelpView) View

func (h *HelpView) View() string

type MethodsListItem

type MethodsListItem struct {
	Name      string
	ShortName string
}

func NewMethodsListItem

func NewMethodsListItem(name string) MethodsListItem

func (MethodsListItem) Description

func (i MethodsListItem) Description() string

func (MethodsListItem) FilterValue

func (i MethodsListItem) FilterValue() string

func (MethodsListItem) Title

func (i MethodsListItem) Title() string

type MethodsListKeyMap

type MethodsListKeyMap struct {
	Enter key.Binding
}

type MethodsListView

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

func NewMethodsListView

func NewMethodsListView(commands *Commands) *MethodsListView

func (*MethodsListView) HandleWindowSize

func (m *MethodsListView) HandleWindowSize(msg tea.WindowSizeMsg)

func (*MethodsListView) Init

func (m *MethodsListView) Init() tea.Cmd

func (*MethodsListView) Update

func (m *MethodsListView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*MethodsListView) View

func (m *MethodsListView) View() string

type NewStatus added in v0.0.3

type NewStatus struct {
	Status string
	Type   StatusType
}

type NewStatusMessage added in v0.0.3

type NewStatusMessage struct {
	Type StatusMsgType
	Msg  string
}

type ReceivedResponse

type ReceivedResponse struct {
	Response string
	// contains filtered or unexported fields
}

type ReceivedStatus

type ReceivedStatus struct {
	Status string
	// contains filtered or unexported fields
}

type RequestKeyMap

type RequestKeyMap struct {
	Send       key.Binding
	Format     key.Binding
	ToggleDesc key.Binding
}

func DefaultRequestKeyMap

func DefaultRequestKeyMap() RequestKeyMap

func (RequestKeyMap) Bindings

func (r RequestKeyMap) Bindings() []key.Binding

type RequestView

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

func NewRequesterView

func NewRequesterView(commands *Commands) *RequestView

func (*RequestView) FormatInput

func (r *RequestView) FormatInput()

func (*RequestView) HandleWindowSize

func (r *RequestView) HandleWindowSize(msg tea.WindowSizeMsg)

func (*RequestView) Init

func (r *RequestView) Init() tea.Cmd

func (*RequestView) SyncSize

func (r *RequestView) SyncSize()

func (*RequestView) Update

func (r *RequestView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*RequestView) View

func (r *RequestView) View() string

type ResendRequest

type ResendRequest struct {
}

type ResponseKeyMap

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

func DefaultResponseKeyMap

func DefaultResponseKeyMap() ResponseKeyMap

func (ResponseKeyMap) Bindings

func (r ResponseKeyMap) Bindings() []key.Binding

type ResponseView

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

func NewResponseView

func NewResponseView(commands *Commands) *ResponseView

func (*ResponseView) HandleWindowSize

func (r *ResponseView) HandleWindowSize(msg tea.WindowSizeMsg)

func (*ResponseView) Init

func (r *ResponseView) Init() tea.Cmd

func (*ResponseView) Update

func (r *ResponseView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ResponseView) View

func (r *ResponseView) View() string

type Root

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

func NewRoot

func NewRoot(config config.Config, grpc *grpc.Wrapper, store *store.Store) *Root

func (*Root) CurrentView

func (m *Root) CurrentView() tea.Model

func (*Root) Init

func (m *Root) Init() tea.Cmd

func (*Root) Update

func (m *Root) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Root) UpdateCurrentView

func (m *Root) UpdateCurrentView(msg tea.Msg) tea.Cmd

func (*Root) View

func (m *Root) View() string

type RootKeyMap

type RootKeyMap struct {
	Back      key.Binding
	ForceQuit key.Binding
}

type ServicesListItem

type ServicesListItem struct {
	Name string
}

func (ServicesListItem) Description

func (i ServicesListItem) Description() string

func (ServicesListItem) FilterValue

func (i ServicesListItem) FilterValue() string

func (ServicesListItem) Title

func (i ServicesListItem) Title() string

type ServicesListKeyMap

type ServicesListKeyMap struct {
	Enter key.Binding
}

type ServicesListView

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

func NewServicesListView

func NewServicesListView(commands *Commands) *ServicesListView

func (*ServicesListView) HandleWindowSize

func (m *ServicesListView) HandleWindowSize(msg tea.WindowSizeMsg)

func (*ServicesListView) Init

func (m *ServicesListView) Init() tea.Cmd

func (*ServicesListView) Update

func (m *ServicesListView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ServicesListView) View

func (m *ServicesListView) View() string

type ShowMethodsList

type ShowMethodsList struct {
	Service string
	Methods []string
}

type ShowRequester

type ShowRequester struct {
	Method        string
	InDescription string
	InExample     string
}

type ShowResponseView

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

type ShowServicesList

type ShowServicesList struct {
	Services []string
}

type StatusMsgType

type StatusMsgType int

type StatusType

type StatusType int

type StatusView

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

func NewStatusView

func NewStatusView() *StatusView

func (*StatusView) HandleWindowSize

func (s *StatusView) HandleWindowSize(msg tea.WindowSizeMsg)

func (*StatusView) Init

func (s *StatusView) Init() tea.Cmd

func (*StatusView) Update

func (s *StatusView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*StatusView) View

func (s *StatusView) View() string

type TitleView

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

func NewTitleView

func NewTitleView(title string) TitleView

func (*TitleView) SetTitle

func (v *TitleView) SetTitle(title string)

func (*TitleView) View

func (v *TitleView) View() string

type View

type View int
const (
	Services View = iota
	Methods  View = iota
	Request  View = iota
	Response View = iota
)

Jump to

Keyboard shortcuts

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