Documentation ¶
Index ¶
- Variables
- func NewToolsPrintCmd[B firecore.Block](chain *firecore.Chain[B]) *cobra.Command
- func PrintBStreamBlock(b *pbbstream.Block, printTransactions bool, out io.Writer) error
- func PrintOutputModeNames() []string
- func SetupJsonMarshaller(cmd *cobra.Command, chainFileDescriptor protoreflect.FileDescriptor) (*fcjson.Marshaller, error)
- type PrintOutputMode
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 PrintBStreamBlock ¶
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.
Click to show internal directories.
Click to hide internal directories.