value

package
v0.0.0-...-e3369bb Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigInt

type BigInt struct {
	Value *big.Int
}

BigInt represents a uint64 and int64 when we are allowing for byte overflows

func (BigInt) Add

func (value BigInt) Add(toAdd fix.Value) (fix.Value, error)

Add the previous value to the read value, assuring we stay within the constraints of either an int64 or uint64 depending on the previous value

func (BigInt) GetAsFix

func (value BigInt) GetAsFix() fix.Value

GetAsFix returns a raw big.Int wrapped in a fix type

type ByteVector

type ByteVector struct {
	Value         []byte
	ItemsToRemove int32
}

ByteVector represents a byte vector fast value. Items to remove is used when applying a delta to a byte vector

func (ByteVector) Add

func (value ByteVector) Add(toAdd fix.Value) (fix.Value, error)

Add applies the read value to the previous toAdd value. ItemsToRemove represents how much of the existing value to overwrite. Positive means overwrite from end of existing []byte, negative means overwrite from beginning of existing []byte.

func (ByteVector) ApplyTail

func (value ByteVector) ApplyTail(baseValue fix.Value) (fix.Value, error)

ApplyTail overwrites the end of the previous []byte with the read value

func (ByteVector) GetAsFix

func (value ByteVector) GetAsFix() fix.Value

GetAsFix returns a raw []byte wrapped in a fix type

type Int32Value

type Int32Value struct {
	Value int32
}

Int32Value represents a int32 fast value

func (Int32Value) Add

func (value Int32Value) Add(toAdd fix.Value) (fix.Value, error)

Add the previous value to the read value, assuring we stay within the constraints of a int32

func (Int32Value) GetAsFix

func (value Int32Value) GetAsFix() fix.Value

GetAsFix returns a raw int32 wrapped in a fix type

type Int64Value

type Int64Value struct {
	Value int64
}

Int64Value represents a int64 fast value

func (Int64Value) Add

func (value Int64Value) Add(toAdd fix.Value) (fix.Value, error)

Add is used when we are deserialising an int32 (this is its overflow type, much like int64 overflow type is big int).

func (Int64Value) GetAsFix

func (value Int64Value) GetAsFix() fix.Value

GetAsFix returns a raw int64 wrapped in a fix type

type NullValue

type NullValue struct {
}

NullValue represents a null fast value

func (NullValue) Add

func (value NullValue) Add(toAdd fix.Value) (fix.Value, error)

Add returns a fix null representation

func (NullValue) GetAsFix

func (value NullValue) GetAsFix() fix.Value

GetAsFix returns a fix null representation

type StringValue

type StringValue struct {
	Value         string
	ItemsToRemove int32
}

StringValue represents a string fast value. Items to remove is used when applying a delta to a string

func (StringValue) Add

func (value StringValue) Add(toAdd fix.Value) (fix.Value, error)

Add applies the read value to the previous toAdd value. ItemsToRemove represents how much of the existing value to overwrite. Positive means overwrite from end of existing string, negative means overwrite from beginning of existing string.

func (StringValue) ApplyTail

func (value StringValue) ApplyTail(baseValue fix.Value) (fix.Value, error)

ApplyTail overwrites the end of the previous string with the read value

func (StringValue) GetAsFix

func (value StringValue) GetAsFix() fix.Value

GetAsFix returns a raw string wrapped in a fix type

type UInt32Value

type UInt32Value struct {
	Value uint32
}

UInt32Value represents a uint32 fast value

func (UInt32Value) Add

func (value UInt32Value) Add(toAdd fix.Value) (fix.Value, error)

Add the previous value to the read value, assuring we stay within the constraints of a uint32

func (UInt32Value) GetAsFix

func (value UInt32Value) GetAsFix() fix.Value

GetAsFix returns a raw uint32 wrapped in a fix type

type UInt64Value

type UInt64Value struct {
	Value uint64
}

UInt64Value represents a uint64 fast value

func (UInt64Value) Add

func (value UInt64Value) Add(toAdd fix.Value) (fix.Value, error)

Add should never be called on this type, as we should be treating uint64 values of big ints when decoding them from the stream to allow for byte overflow

func (UInt64Value) GetAsFix

func (value UInt64Value) GetAsFix() fix.Value

GetAsFix returns a raw uint64 wrapped in a fix type

type Value

type Value interface {
	GetAsFix() fix.Value
	Add(value fix.Value) (fix.Value, error)
}

Value is a fast decoded value that can be converted to a fix representation

Jump to

Keyboard shortcuts

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