datadictionary

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2017 License: Apache-1.1 Imports: 3 Imported by: 0

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

func (Component) Required added in v0.2.0

func (c Component) Required() bool

Required returns true if this component is required for the containing MessageDef

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 Enum

type Enum struct {
	Value       string
	Description string
}

Enum is a container for value and description.

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

func NewFieldDef(fieldType *FieldType, required bool) *FieldDef

NewFieldDef returns an initialized FieldDef

func NewGroupFieldDef added in v0.2.0

func NewGroupFieldDef(fieldType *FieldType, required bool, parts []MessagePart) *