transaction

package
v0.0.0-...-f1492f4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 10 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) EncodeMoney

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

EncodeMoney converting Asset 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

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) EncodeMoney

func (encoder *RollingEncoder) EncodeMoney(v string)

EncodeMoney adding Asset 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

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