transaction

package
v0.0.0-...-8e4544a Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

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

Encoder structure for the converter

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

NewEncoder initializing a new converter

func (*Encoder) Encode

func (encoder *Encoder) Encode(v interface{}) error

Encode function that determines the input values of which converter to use

func (*Encoder) EncodeArrString

func (encoder *Encoder) EncodeArrString(v []string) error

EncodeArrString converting []string to byte

func (*Encoder) EncodeBool

func (encoder *Encoder) EncodeBool(b bool) error

EncodeBool converting bool to byte

func (*Encoder) EncodeNumber

func (encoder *Encoder) EncodeNumber(v interface{}) error

EncodeNumber converting number to byte

func (*Encoder) EncodePubKey

func (encoder *Encoder) EncodePubKey(s string) error

EncodePubKey converting PubKey to byte

func (*Encoder) EncodeString

func (encoder *Encoder) EncodeString(v string) error

EncodeString converting string to byte

func (*Encoder) EncodeUVarint

func (encoder *Encoder) EncodeUVarint(i uint64) error

EncodeUVarint converting uint64 to byte

func (*Encoder) EncodeVarint

func (encoder *Encoder) EncodeVarint(i int64) error

EncodeVarint converting int64 to byte

func (*Encoder) WriteBytes

func (encoder *Encoder) WriteBytes(bs []byte) error

func (*Encoder) WriteString

func (encoder *Encoder) WriteString(s string) error

type RollingEncoder

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

RollingEncoder structure for the chain of converters

func NewRollingEncoder

func NewRollingEncoder(next *Encoder) *RollingEncoder

NewRollingEncoder initializing the chain of converters

func (*RollingEncoder) Encode

func (encoder *RollingEncoder) Encode(v interface{})

Encode adding to a chain of other values

func (*RollingEncoder) EncodeArrString

func (encoder *RollingEncoder) EncodeArrString(v []string)

EncodeArrString adding []string to the converted value

func (*RollingEncoder) EncodeBool

func (encoder *RollingEncoder) EncodeBool(v bool)

EncodeBool adding bool to the converted value

func (*RollingEncoder) EncodeNumber

func (encoder *RollingEncoder) EncodeNumber(v interface{})

EncodeNumber adding number to the converted value

func (*RollingEncoder) EncodePubKey

func (encoder *RollingEncoder) EncodePubKey(v string)

EncodePubKey adding PubKey to the converted value

func (*RollingEncoder) EncodeString

func (encoder *RollingEncoder) EncodeString(v string)

EncodeString adding string to the converted value

func (*RollingEncoder) EncodeUVarint

func (encoder *RollingEncoder) EncodeUVarint(i uint64)

EncodeUVarint adding uint64 to the converted value

func (*RollingEncoder) EncodeVarint

func (encoder *RollingEncoder) EncodeVarint(i int64)

EncodeVarint adding int64 to the converted value

func (*RollingEncoder) Err

func (encoder *RollingEncoder) Err() error

Err function that returns an error (if any) from the cup of converters

func (*RollingEncoder) WriteBytes

func (encoder *RollingEncoder) WriteBytes(v []byte)

WriteBytes adding []byte to the converted value

func (*RollingEncoder) WriteString

func (encoder *RollingEncoder) WriteString(v string)

WriteString adding string to the converted value

type TransactionMarshaller

type TransactionMarshaller interface {
	MarshalTransaction(*Encoder) error
}

TransactionMarshaller interface for converting data into byte

Jump to

Keyboard shortcuts

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