Documentation
¶
Index ¶
- Constants
- Variables
- func CalcCheckSum(body []byte) []byte
- func ValueByTag(msg []byte, tag string) ([]byte, error)
- type Bool
- type Component
- func (c *Component) AsComponent() *Component
- func (c *Component) AsTemplate() Items
- func (c *Component) Get(id int) Item
- func (c *Component) Items() Items
- func (c *Component) Set(id int, v Item)
- func (c *Component) SetComponent(id int, v *Component)
- func (c *Component) SetField(id int, v Item)
- func (c *Component) SetGroup(id int, v *Group)
- func (c *Component) String() string
- func (c *Component) ToBytes() []byte
- type Float
- type Group
- type Int
- type Item
- type Items
- type KeyValue
- type KeyValues
- type Message
- func (msg *Message) BeginString() *KeyValue
- func (msg *Message) BeginStringTag() string
- func (msg *Message) Body() (kvs Items)
- func (msg *Message) BodyLength() int
- func (msg *Message) BodyLengthTag() string
- func (msg *Message) BytesWithoutChecksum() []byte
- func (msg *Message) CalcBodyLength() int
- func (msg *Message) CheckSum() string
- func (msg *Message) CheckSumTag() string
- func (msg *Message) Get(id int) Item
- func (msg *Message) Header() *Component
- func (msg *Message) Items() Items
- func (msg *Message) MsgType() string
- func (msg *Message) Prepare() error
- func (msg *Message) Set(id int, item Item) *Message
- func (msg *Message) SetBody(body ...Item) *Message
- func (msg *Message) SetHeader(header *Component) *Message
- func (msg *Message) SetTrailer(trailer *Component) *Message
- func (msg *Message) String() string
- func (msg *Message) ToBytes() ([]byte, error)
- func (msg *Message) Trailer() *Component
- type Raw
- type StorageID
- type StorageSide
- type String
- type Time
- type Uint
- type Value
Constants ¶
const ( // CountOfSOHSymbols // Deprecated: should not be used, count SOH symbols by yourself CountOfSOHSymbols = 3 // CountOfSOHSymbolsWithoutBody // Deprecated: should not be used, count SOH symbols by yourself CountOfSOHSymbolsWithoutBody = 2 )
const ( True = "Y" False = "N" )
const TimeLayout = "20060102-15:04:05.000"
Variables ¶
var Delimiter = []byte{1}
Functions ¶
func CalcCheckSum ¶
Types ¶
type Bool ¶
type Bool struct {
// contains filtered or unexported fields
}
Bool is a structure used for converting Boolean values.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component is an array of various FIX entities. It may contain a KeyValue, a Group and another Component.
func NewComponent ¶
NewComponent is used to create a new Component instance.
func (*Component) AsComponent ¶
AsComponent returns a specified component. This is required for structures that integrate this component.
func (*Component) AsTemplate ¶
AsTemplate returns a new structure with the same set of items as in a specified component (these items are assigned empty values).
func (*Component) Get ¶
Get returns a specific component item identified by its sequence number. Such item may be a *KeyValue, *Component or *Group.
func (*Component) SetComponent ¶
SetComponent is used to define an internal component for an item.
type Float ¶
type Float struct {
// contains filtered or unexported fields
}
Float is a structure used for converting values to the float64 type.
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
Group is a structure used to implement FIX group types.
func NewGroup ¶
NewGroup is used to create a new group based on: - the tag value specifying the number of elements, and - the list of tags
func (*Group) AddEntry ¶
AddEntry adds a new entry with the same list of tags as in a specified group. To generate all tags for a newly created entry, use the AsTemplate method.
func (*Group) AsTemplate ¶
AsTemplate returns a list of group tags as an Items object.
func (*Group) Entries ¶
Entries returns all entries belonging to a group as an array of Items objects.
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
Int is a structure used for converting integer values.
type Item ¶
Item is an interface providing a method required to implement basic FIX item functionality.
type Items ¶
type Items []Item
Items is an array of Item elements.
type KeyValue ¶
KeyValue is a basic structure used for FIX message implementation. It is used to specify the tag and value for each field.
func NewKeyValue ¶
NewKeyValue returns a new KeyValue object.
func (*KeyValue) AsTemplate ¶
AsTemplate returns a copy of a KeyValue object with an empty value assigned to it.
func (*KeyValue) FromBytes ¶
FromBytes replaces a KeyValue object specified in the form of a byte array.
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message is a structure providing functionality to FIX messages.
func NewMessage ¶
func NewMessage(beginStringTag, bodyLengthTag, checkSumTag, msgTypeTag, beginString, msgType string) *Message
NewMessage is called to create a new message.
func (*Message) BeginString ¶
BeginString returns the beginString field value.
func (*Message) BeginStringTag ¶ added in v1.13.0
func (*Message) BodyLength ¶
BodyLength returns the BodyLength field value.
func (*Message) BodyLengthTag ¶ added in v1.13.0
func (*Message) BytesWithoutChecksum ¶
func (*Message) CalcBodyLength ¶
func (*Message) CheckSumTag ¶ added in v1.13.0
func (*Message) Get ¶
Get returns an Item corresponding to the message body (identified by the item sequence number).
func (*Message) Set ¶
Set replaces an Item corresponding to the message body (identified by the item sequence number).
func (*Message) SetTrailer ¶
SetTrailer specifies the message trailer fields (except for checkSum).
type Raw ¶
type Raw struct {
// contains filtered or unexported fields
}
Raw is a structure that is used to convert the message data to a byte array.
type StorageID ¶ added in v1.13.0
type StorageID struct { Sender string Target string Side StorageSide }
type StorageSide ¶ added in v1.14.0
type StorageSide string
const ( Incoming StorageSide = "incoming" Outgoing StorageSide = "outgoing" )
type String ¶
type String struct {
// contains filtered or unexported fields
}
String is a structure used for converting string values.
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
Time is a structure used for converting date-time values.
type Uint ¶
type Uint struct {
// contains filtered or unexported fields
}
Uint is a structure used for converting values to the uint64 type.
type Value ¶
type Value interface { // ToBytes returns a byte representation of a field value. ToBytes() []byte // FromBytes parses values stored in a byte array. FromBytes([]byte) error // Value returns a field value. Value() interface{} // String returns a string representation of a value. String() string // IsNull is used to check whether a field value is empty. IsNull() bool // Set replaces a specified field value with a value of a corresponding type. Set(d interface{}) error }
Value is an interface implementing all basic methods required to process field values of FIX messages.