text

package
v1.0.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: Apache-2.0 Imports: 9 Imported by: 227

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EncoderColorCyan = color.New(color.FgCyan)
View Source
var EncoderColorGreen = color.New(color.FgGreen)
View Source
var EncoderColorWhite = color.New(color.FgWhite)
View Source
var EncoderColorYellow = color.New(color.FgYellow)

Functions

This section is empty.

Types

type Blob

type Blob string

Blob is base64 encoded data https://github.com/EOSIO/fc/blob/0e74738e938c2fe0f36c5238dbc549665ddaef82/include/fc/variant.hpp#L47

func (Blob) Data

func (b Blob) Data() ([]byte, error)

Data returns decoded base64 data

func (Blob) String

func (b Blob) String() string

String returns the blob as a string

type Bool

type Bool bool

func (Bool) TextEncode

func (b Bool) TextEncode(encoder *Encoder, option *Option) error

type Encoder

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

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) Encode

func (e *Encoder) Encode(v interface{}, option *Option) (err error)

func (*Encoder) ToWriter

func (e *Encoder) ToWriter(s string, indent bool, c *color.Color) (err error)

type Float128

type Float128 Uint128

func (Float128) TextEncode

func (f Float128) TextEncode(encoder *Encoder, option *Option) error

type HexBytes

type HexBytes []byte

func (HexBytes) TextEncode

func (o HexBytes) TextEncode(encoder *Encoder, option *Option) error

type Int128

type Int128 Uint128

Int128

func (Int128) BigInt

func (i Int128) BigInt() *big.Int

func (Int128) DecimalString

func (i Int128) DecimalString() string

func (Int128) TextEncode

func (i Int128) TextEncode(encoder *Encoder, option *Option) error

type Int64

type Int64 int64

func (Int64) TextEncode

func (i Int64) TextEncode(encoder *Encoder, option *Option) error

type JSONFloat64

type JSONFloat64 float64

func (JSONFloat64) TextEncode

func (f JSONFloat64) TextEncode(encoder *Encoder, option *Option) error

type Option

type Option struct {
	NoTypeName bool
	// contains filtered or unexported fields
}

type SafeString

type SafeString string

func (SafeString) TextEncode

func (ss SafeString) TextEncode(encoder *Encoder, option *Option) error

type TextEncodable

type TextEncodable interface {
	TextEncode(encoder *Encoder, option *Option) error
}

type Uint128

type Uint128 struct {
	Lo uint64
	Hi uint64
}

uint128

func (Uint128) BigInt

func (i Uint128) BigInt() *big.Int

func (Uint128) DecimalString

func (i Uint128) DecimalString() string

func (Uint128) TextEncode

func (i Uint128) TextEncode(encoder *Encoder, option *Option) error

type Uint64

type Uint64 uint64

func (Uint64) TextEncode

func (i Uint64) TextEncode(encoder *Encoder, option *Option) error

type Varint16

type Varint16 int16

func (Varint16) TextEncode

func (o Varint16) TextEncode(encoder *Encoder, option *Option) error

type Varint32

type Varint32 int32

func (Varint32) TextEncode

func (o Varint32) TextEncode(encoder *Encoder, option *Option) error

type Varuint16

type Varuint16 uint16

func (Varuint16) TextEncode

func (o Varuint16) TextEncode(encoder *Encoder, option *Option) error

type Varuint32

type Varuint32 uint32

func (Varuint32) TextEncode

func (o Varuint32) TextEncode(encoder *Encoder, option *Option) error

Jump to

Keyboard shortcuts

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