Documentation
¶
Overview ¶
Package datadictionary provides support for parsing and organizing FIX Data Dictionaries
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
*ComponentType
// contains filtered or unexported fields
}
Component is a Component as it appears in a given MessageDef
func NewComponent ¶ added in v0.3.0
func NewComponent(ct *ComponentType, required bool) *Component
NewComponent returns an initialized Component instance
type ComponentType ¶ added in v0.2.0
type ComponentType struct {
// contains filtered or unexported fields
}
ComponentType is a grouping of fields.
func NewComponentType ¶ added in v0.2.0
func NewComponentType(name string, parts []MessagePart) *ComponentType
NewComponentType returns an initialized component type
func (ComponentType) Fields ¶ added in v0.2.0
func (c ComponentType) Fields() []*FieldDef
Fields returns all fields contained in this component. Includes fields encapsulated in components of this component
func (ComponentType) Name ¶ added in v0.2.0
func (c ComponentType) Name() string
Name returns the name of this component type
func (ComponentType) Parts ¶ added in v0.2.0
func (c ComponentType) Parts() []MessagePart
Parts returns all parts in declaration order contained in this component
func (ComponentType) RequiredFields ¶ added in v0.2.0
func (c ComponentType) RequiredFields() []*FieldDef
RequiredFields returns those fields that are required for this component
func (ComponentType) RequiredParts ¶ added in v0.2.0
func (c ComponentType) RequiredParts() []MessagePart
RequiredParts returns those parts that are required for this component
type DataDictionary ¶
type DataDictionary struct {
FIXType string
Major int
Minor int
ServicePack int
FieldTypeByTag map[int]*FieldType
FieldTypeByName map[string]*FieldType
Messages map[string]*MessageDef
ComponentTypes map[string]*ComponentType
Header *MessageDef
Trailer *MessageDef
}
DataDictionary models FIX messages, components, and fields.
func Parse ¶
func Parse(path string) (*DataDictionary, error)
Parse loads and and build a datadictionary instance from an xml file.
type Field ¶ added in v0.3.0
type Field interface {
Tag() int
}
Field models a field or repeating group in a message
type FieldDef ¶
type FieldDef struct {
*FieldType
Parts []MessagePart
Fields []*FieldDef
// contains filtered or unexported fields
}
FieldDef models a field belonging to a message.
func NewFieldDef ¶ added in v0.2.0
NewFieldDef returns an initialized FieldDef
func NewGroupFieldDef ¶ added in v0.2.0
func NewGroupFieldDef(fieldType *FieldType, required bool, parts []MessagePart) *