presenter

package
v3.0.0-...-28c6083 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTime

func FormatTime(t time.Time) string

FormatTime returns a shortened local time.

Types

type CosmosMessage

type CosmosMessage struct {
	Result blockdb.CosmosMessageResult
}

CosmosMessage presents a blockdb.CosmosMessageResult.

func (CosmosMessage) Channels

func (msg CosmosMessage) Channels() string

func (CosmosMessage) ClientChain

func (msg CosmosMessage) ClientChain() string

func (CosmosMessage) Clients

func (msg CosmosMessage) Clients() string

func (CosmosMessage) Connections

func (msg CosmosMessage) Connections() string

func (CosmosMessage) Height

func (msg CosmosMessage) Height() string

func (CosmosMessage) Index

func (msg CosmosMessage) Index() string

Index is the message's ordered position within the tx.

func (CosmosMessage) Type

func (msg CosmosMessage) Type() string

Type is a URI for the proto definition, e.g. /ibc.core.client.v1.MsgCreateClient

type Highlight

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

func NewHighlight

func NewHighlight(searchTerm string) *Highlight

NewHighlight returns a presenter that adds regions around text that matches searchTerm.

func (*Highlight) Text

func (h *Highlight) Text(text string) (string, []string)

Text returns the text decorated with tview.TextView regions given the "searchTerm" from NewHighlight. The second return value is the highlighted region ids for use with *(tview.TextView).Highlight. See https://github.com/rivo/tview/wiki/TextView for more info about regions.

type TestCase

type TestCase struct {
	Result blockdb.TestCaseResult
}

TestCase presents a blockdb.TestCaseResult.

func (TestCase) ChainID

func (p TestCase) ChainID() string

func (TestCase) Date

func (p TestCase) Date() string

func (TestCase) GitSha

func (p TestCase) GitSha() string

func (TestCase) Height

func (p TestCase) Height() string

func (TestCase) ID

func (p TestCase) ID() string

func (TestCase) Name

func (p TestCase) Name() string

func (TestCase) TxTotal

func (p TestCase) TxTotal() string

type Tx

type Tx struct {
	Result blockdb.TxResult
}

func (Tx) Data

func (tx Tx) Data() string

Data attempts to pretty print JSON. If not valid JSON, returns tx data as-is which may not be human-readable.

func (Tx) Height

func (tx Tx) Height() string

type Txs

type Txs []blockdb.TxResult

func (Txs) ToJSON

func (txs Txs) ToJSON() []byte

ToJSON always renders valid JSON given the blockdb.TxResult. If the tx data is not valid JSON, the tx data is represented as a base64 encoded string.

Jump to

Keyboard shortcuts

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