genfix

package
v0.0.60 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

package genfix is a FIX message format generator.

package genfix is a FIX message format generator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(dir string, pkg Package, opts ...Option) error

Generate generates a Go FIX codecs by a XML specifications.

Types

type Config added in v0.0.52

type Config struct {
	Serialize     map[string]Serialize
	SerializeTag  map[int]SerializeTag
	EnumFormat    map[string]EnumFormat
	EnumFormatTag map[int]EnumFormatTag
	Length        map[string]Length
	LengthTag     map[int]LengthTag
}

func NewConfig added in v0.0.52

func NewConfig() Config

func (Config) Options added in v0.0.52

func (cfg Config) Options() []Option

type EnumFormat

type EnumFormat struct {
	Type string
	Func func(string) (string, error)
}

type EnumFormatTag added in v0.0.52

type EnumFormatTag struct {
	Tag  int
	Func func(string) (string, error)
}

type Length

type Length struct {
	Type string
	Min  int
	Max  int
}

type LengthTag added in v0.0.52

type LengthTag struct {
	Tag int
	Min int
	Max int
}

type Option

type Option func(*Config)

func FIX40 added in v0.0.52

func FIX40() []Option

FIX40 is a FIX.4.0 configuration.

func FIX41 added in v0.0.52

func FIX41() []Option

FIX41 is a FIX.4.1 configuration.

func FIX42 added in v0.0.52

func FIX42() []Option

FIX42 is a FIX.4.2 configuration.

func FIX43 added in v0.0.52

func FIX43() []Option

FIX43 is a FIX.4.3 configuration.

func FIX44 added in v0.0.52

func FIX44() []Option

FIX44 is a FIX.4.4 configuration.

func FIX50 added in v0.0.52

func FIX50() []Option

FIX50 is a FIX.5.0 configuration.

func FIX50SP1 added in v0.0.52

func FIX50SP1() []Option

FIX50SP1 is a FIX.5.0 service pack 1 configuration.

func FIX50SP2 added in v0.0.52

func FIX50SP2() []Option

FIX50SP2 is a FIX.5.0 service pack 2 configuration.

func FIXT11 added in v0.0.52

func FIXT11() []Option

FIXT11 is a FIXT.1.0 (transport) configuration.

func MOEX44 added in v0.0.52

func MOEX44() []Option

MOEX44 is a FIX.4.4 (MOEX.4.4) configuration.

func WithEnumFormat

func WithEnumFormat(formats ...EnumFormat) Option

func WithEnumFormatTag added in v0.0.52

func WithEnumFormatTag(formats ...EnumFormatTag) Option

func WithLength

func WithLength(lengths ...Length) Option

func WithLengthTag added in v0.0.52

func WithLengthTag(lengths ...LengthTag) Option

func WithSerialize

func WithSerialize(serializes ...Serialize) Option

func WithSerializeTag added in v0.0.52

func WithSerializeTag(serializes ...SerializeTag) Option

type Package

type Package struct {
	Name   string
	Format string
	Info   string
	Spec   []byte
}

type Serialize

type Serialize struct {
	Type string
	Func string
}

type SerializeTag added in v0.0.52

type SerializeTag struct {
	Tag  int
	Func string
}

Directories

Path Synopsis
internal
testspec
Package testspec provides test FIX.0.1 protocol format.
Package testspec provides test FIX.0.1 protocol format.
testspec/testspeclogon
Package testspeclogon is a format of the test FIX.0.1 Logon message.
Package testspeclogon is a format of the test FIX.0.1 Logon message.

Jump to

Keyboard shortcuts

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