print

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPrintOutputMode = fmt.Errorf("not a valid PrintOutputMode, try [%s]", strings.Join(_PrintOutputModeNames, ", "))

Functions

func NewToolsPrintCmd

func NewToolsPrintCmd[B firecore.Block](chain *firecore.Chain[B]) *cobra.Command

func PrintBStreamBlock

func PrintBStreamBlock(b *pbbstream.Block, printTransactions bool, out io.Writer) error

func PrintOutputModeNames

func PrintOutputModeNames() []string

PrintOutputModeNames returns a list of possible string values of PrintOutputMode.

func SetupJsonMarshaller added in v1.2.0

func SetupJsonMarshaller(cmd *cobra.Command, chainFileDescriptor protoreflect.FileDescriptor) (*fcjson.Marshaller, error)

Types

type PrintOutputMode

type PrintOutputMode uint
const (
	// PrintOutputModeText is a PrintOutputMode of type Text.
	PrintOutputModeText PrintOutputMode = iota
	// PrintOutputModeJSON is a PrintOutputMode of type JSON.
	PrintOutputModeJSON
	// PrintOutputModeJSONL is a PrintOutputMode of type JSONL.
	PrintOutputModeJSONL
)

func ParsePrintOutputMode

func ParsePrintOutputMode(name string) (PrintOutputMode, error)

ParsePrintOutputMode attempts to convert a string to a PrintOutputMode.

func (PrintOutputMode) IsValid

func (x PrintOutputMode) IsValid() bool

IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values

func (PrintOutputMode) MarshalText

func (x PrintOutputMode) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method.

func (PrintOutputMode) String

func (x PrintOutputMode) String() string

String implements the Stringer interface.

func (*PrintOutputMode) UnmarshalText

func (x *PrintOutputMode) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method.

Jump to

Keyboard shortcuts

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