common

package
v1.17.8-partialblocks Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelModalCmd added in v1.10.0

func CancelModalCmd() tea.Cmd

func EmitBlockSelectedMsg added in v1.1.1

func EmitBlockSelectedMsg(blockNum uint64) tea.Cmd

func EmitModuleSelectedCmd added in v1.10.0

func EmitModuleSelectedCmd(moduleName, target string) tea.Cmd

func ErrorCmd

func ErrorCmd(err error) tea.Cmd

ErrorCmd returns an ErrorMsg from error.

func SetModalComponentCmd added in v1.10.0

func SetModalComponentCmd(comp Component) tea.Cmd

func SetRequestValueCmd added in v1.10.0

func SetRequestValueCmd(field, value string) tea.Cmd

func SetupNewInstanceCmd added in v1.17.4

func SetupNewInstanceCmd(startStream bool) tea.Cmd

func ShortToFullHelp added in v1.10.0

func ShortToFullHelp(comp Component) [][]key.Binding

func ToDynamicBytesRepresentation added in v1.16.2

func ToDynamicBytesRepresentation(bytesRepresentation sink.BytesRepresentation) dynamic.BytesRepresentation

ToDynamicBytesRepresentation converts a sink.BytesRepresentation to a dynamic.BytesRepresentation. We don't use dynamic.BytesRepresentation directly because it requires a golang override of dynamic module

Types

type BlockContext added in v1.16.2

type BlockContext struct {
	Module   string
	BlockNum uint64
}

BlockContext represents a module and block number combination

type BlockSelectedMsg added in v1.1.1

type BlockSelectedMsg uint64 // Emitted to inform all components that a new block has been selected.

type CancelModalMsg added in v1.10.0

type CancelModalMsg struct{} // Emitted by components to close itselt

type Common

type Common struct {
	Width  int
	Height int
}

Common is a struct all components should embed.

func (*Common) GetHeight added in v1.10.0

func (c *Common) GetHeight() int

func (*Common) GetWidth added in v1.10.0

func (c *Common) GetWidth() int

func (*Common) SetSize

func (c *Common) SetSize(width, height int)

SetSize sets the width and height of the common struct.

type Component

type Component interface {
	tea.Model
	help.KeyMap
	SetSize(width, height int)
	GetWidth() int
	GetHeight() int
}

Component represents a Bubble Tea model that implements a SetSize function.

type ErrorMsg

type ErrorMsg error

ErrorMsg is a Bubble Tea message that represents an error.

type GoToOutputMsg added in v1.10.0

type GoToOutputMsg struct{}

type IsFullWidthModal added in v1.10.0

type IsFullWidthModal interface {
	IsFullWidthModal()
}

type IsInlineModal added in v1.10.0

type IsInlineModal interface {
	IsInlineModal()
}

type ModuleSelectedMsg added in v1.1.1

type ModuleSelectedMsg struct {
	Target     string
	ModuleName string
}

type SetModalComponentMsg added in v1.10.0

type SetModalComponentMsg Component

type SetRequestValue added in v1.10.0

type SetRequestValue struct {
	Field string
	Value string
}

type SetupNewInstanceMsg added in v1.17.4

type SetupNewInstanceMsg struct {
	StartStream bool
}

type SimpleHelp added in v1.10.0

type SimpleHelp struct {
	Bindings []key.Binding
}

func NewSimpleHelp added in v1.10.0

func NewSimpleHelp(bindings ...key.Binding) SimpleHelp

func (SimpleHelp) FullHelp added in v1.10.0

func (h SimpleHelp) FullHelp() [][]key.Binding

func (SimpleHelp) ShortHelp added in v1.10.0

func (h SimpleHelp) ShortHelp() []key.Binding

type TUIConfig added in v1.16.2

type TUIConfig struct {
	ManifestPath  string
	HomeDir       string
	Vcr           bool
	Headers       map[string]string
	StartBlock    int64
	StopBlock     string
	Cursor        string
	Params        string
	DefaultParams string
	OutputModule  string
	RequiresBuild bool
}

TUIConfig contains TUI-specific configuration that doesn't belong in SinkerConfig

type UpdateSeenModulesMsg added in v1.1.1

type UpdateSeenModulesMsg []string

Jump to

Keyboard shortcuts

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