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 PrintOutputModeNames ¶
func PrintOutputModeNames() []string
PrintOutputModeNames returns a list of possible string values of PrintOutputMode.
Types ¶
type BytesOutputPrinter ¶ added in v1.7.2
type BytesOutputPrinter struct {
// contains filtered or unexported fields
}
func NewBytesOutputPrinter ¶ added in v1.7.2
func NewBytesOutputPrinter(bytesEncoding string, registry *fcproto.Registry) *BytesOutputPrinter
type JSONOutputPrinter ¶ added in v1.6.9
type JSONOutputPrinter struct {
// contains filtered or unexported fields
}
type OutputPrinter ¶ added in v1.6.9
func GetOutputPrinter ¶ added in v1.6.9
func GetOutputPrinter(cmd *cobra.Command, chainFileDescriptor protoreflect.FileDescriptor) (OutputPrinter, error)
func NewJSONOutputPrinter ¶ added in v1.6.9
type PrintOutputMode ¶
type PrintOutputMode uint
ENUM(Text, JSON, JSONL, ProtoJSON, ProtoJSONL, Bytes)
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 // PrintOutputModeProtoJSON is a PrintOutputMode of type ProtoJSON. PrintOutputModeProtoJSON // PrintOutputModeProtoJSONL is a PrintOutputMode of type ProtoJSONL. PrintOutputModeProtoJSONL // PrintOutputModeBytes is a PrintOutputMode of type Bytes. PrintOutputModeBytes )
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.
type ProtoJSONOutputPrinter ¶ added in v1.6.9
type ProtoJSONOutputPrinter struct {
// contains filtered or unexported fields
}
func NewProtoJSONOutputPrinter ¶ added in v1.6.9
func NewProtoJSONOutputPrinter(indent string, registry *fcproto.Registry) *ProtoJSONOutputPrinter
type TextOutputPrinter ¶ added in v1.6.9
type TextOutputPrinter struct {
// contains filtered or unexported fields
}
func NewTextOutputPrinter ¶ added in v1.6.9
func NewTextOutputPrinter(bytesEncoding string, registry *fcproto.Registry, printTransactions bool) *TextOutputPrinter
Click to show internal directories.
Click to hide internal directories.