modules

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Back = func() tea.Msg { return BackMsg{} }

Back loads the previous module in the pipeline.

View Source
var Init = func() tea.Msg { return InitMsg{} }

Init initialized the first module of the pipeline.

View Source
var Next = func() tea.Msg { return NextMsg{} }

Next loads the next module in the pipeline.

View Source
var None = func() tea.Msg { return nil }

None is a placeholder to be returned from the module's init function. If the modules doesn't need to do anything special, it must return None instead of nil.

View Source
var Resize = func() tea.Msg { return ResizeMsg{} }

Resize can be used, to manually trigger a resize of the tui components.

Functions

This section is empty.

Types

type BackMsg

type BackMsg struct{}

type Canceler

type Canceler interface {
	CancelFunc() ctx.CancelFunc
}

type Default

type Default struct {
	ForkBackMsg ForkBackMsg
	Ctx         *context.Context
	PrePipe     []Piper
	Pipe        []Piper
	PostPipe    []Piper
}

type ErrMsg

type ErrMsg error

type Error

type Error struct {
	Message string
	Help    string
}

func (Error) Error

func (e Error) Error() string

func (Error) Render

func (e Error) Render(width int) string

type ForkBackMsg

type ForkBackMsg int

type ForkMsg

type ForkMsg int
const (
	ForkMsgNone ForkMsg = iota
	ForkMsgQuit
	ForkMsgTrade
	ForkMsgSwap
	ForkMsgOrder
	ForkMsgSettings
	ForkMsgWalletSettings
	ForkMsgWalletSettingsNew
	ForkMsgWalletSettingsDerivation
	ForkMsgCustomEndpoint
)

type Forker

type Forker interface {
	Fork() ForkMsg
}

type InitMsg

type InitMsg struct{}

type Module

type Module interface {
	fmt.Stringer

	Init(ctx *context.Context) tea.Cmd
	Update(tea.Msg) tea.Cmd
	Cancel()
}

type ModulePiper

type ModulePiper interface {
	PrePipe() []Piper
	Pipe() []Piper
	PostPipe() []Piper
}

type NextMsg

type NextMsg struct{}

type PipeCancelFuncMsg

type PipeCancelFuncMsg ctx.CancelFunc

type PipeDoneMsg

type PipeDoneMsg struct{}

type PipeMessenger

type PipeMessenger interface {
	Message() string
}

type PipeMsg

type PipeMsg string

type Piper

type Piper interface {
	fmt.Stringer

	Run(ctx *context.Context) error
}

type ResizeMsg

type ResizeMsg struct{}

Jump to

Keyboard shortcuts

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