Documentation
¶
Index ¶
Constants ¶
const ( GroupItem = "group" FieldItem = "field" ComponentItem = "component" )
Variables ¶
var DefaultFlowFields = map[string][]string{ "Logon": {"HeartBtInt", "EncryptMethod", "Password", "Username", "ResetSeqNumFlag"}, "Logout": nil, "Heartbeat": {"TestReqID"}, "TestRequest": {"TestReqID"}, "ResendRequest": {"BeginSeqNo", "EndSeqNo"}, "SequenceReset": {"NewSeqNo", "GapFillFlag"}, "Reject": {"SessionRejectReason", "RefSeqNum", "RefTagID"}, "ExecutionReport": nil, "NewOrderSingle": nil, "MarketDataRequest": nil, "OrderCancelRequest": nil, }
DefaultFlowFields indicates the required tags for each message type that must be contained in the trailer. A FIX session pipeline will not operate properly if any of these tags are missing for the specified messages.
var ExcludedFields = map[string]bool{ "BeginString": true, "BodyLength": true, "MsgType": true, "CheckSum": true, }
ExcludedFields specifies the tags that will be omitted in generated messages because they are already included into the base message structure.
var RequiredHeaderFields = map[string]bool{ "BeginString": true, "BodyLength": true, "MsgType": true, "SenderCompID": true, "TargetCompID": true, "MsgSeqNum": true, "SendingTime": true, }
RequiredHeaderFields indicates the required fields that must be contained in the header. A FIX message is not considered properly structured unless it contains these fields in its header.
var RequiredTrailerFields = map[string]bool{ "CheckSum": true, }
RequiredTrailerFields indicates the required field(s) that must be contained in the trailer. A FIX message is not considered properly structured unless it contains these fields in its trailer.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct { Name string `xml:"name,attr"` MsgCat string `xml:"msgcat,attr"` MsgType string `xml:"msgtype,attr"` Members []*ComponentMember `xml:",any"` }
Component is a structure identifying the set of basic elements required for FIX messages, such as key-value groups or basic components.
type ComponentMember ¶
type ComponentMember struct { XMLName xml.Name Name string `xml:"name,attr"` Required string `xml:"required,attr"` Members []*ComponentMember `xml:",any"` }
type Doc ¶
type Doc struct { Type string `xml:"type,attr"` Major string `xml:"major,attr"` Minor string `xml:"minor,attr"` ServicePack int `xml:"servicepack,attr"` Header *Component `xml:"header"` Trailer *Component `xml:"trailer"` Messages []*Component `xml:"messages>message"` Components []*Component `xml:"components>component"` Fields []*Field `xml:"fields>field"` }
Doc is a structure identifying the components and fields required for a custom FIX protocol implementation.
type Field ¶
type Field struct { Number string `xml:"number,attr"` Name string `xml:"name,attr"` Type string `xml:"type,attr"` Values []*Value `xml:"value"` }
Field is a structure used to implement key-value groups.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator reads a specified file (Doc) to create structures and methods required for constructing FIX messages.
func NewGenerator ¶
NewGenerator creates a new Generator instance.