Documentation ¶
Index ¶
- func BitMapArrayToHex(arr []int64) (string, error)
- func FixedLengthIntegerValidator(field int, length int, data string) (bool, error)
- func HexToBitmapArray(hexString string) ([]int64, error)
- func MtiValidator(mti MtiType) (bool, error)
- func VariableLengthAlphaNumericValidator(field int, min int, max int, data string) (bool, error)
- func VariableLengthIntegerValidator(field int, min int, max int, data string) (bool, error)
- type ElementsType
- type FieldDescription
- type IsoStruct
- type MtiType
- type Spec
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BitMapArrayToHex ¶
BitMapArrayToHex converts a iso8583 bit array into a hex string
func FixedLengthIntegerValidator ¶
FixedLengthIntegerValidator checks that an integer that is supposed to be of fixed width is of that length
func HexToBitmapArray ¶
HexToBitmapArray converts a hex string to a bit array
func MtiValidator ¶
MtiValidator validates and iso8583 mti
func VariableLengthAlphaNumericValidator ¶
VariableLengthAlphaNumericValidator checks variable length alphanum Fields for the correct length
Types ¶
type ElementsType ¶
type ElementsType struct {
// contains filtered or unexported fields
}
ElementsType stores iso8583 elements in a map
func (*ElementsType) GetElements ¶
func (e *ElementsType) GetElements() map[int64]string
GetElements returns the available elemts as a map
type FieldDescription ¶
type FieldDescription struct { ContentType string `yaml:"ContentType"` MaxLen int `yaml:"MaxLen"` MinLen int `yaml:"MinLen"` LenType string `yaml:"LenType"` Label string `yaml:"Label"` HeaderHex bool `yaml:"HeaderHex"` Contain string `yaml:"Contain"` }
FieldDescription contains fields that describes an iso8583 Field
type IsoStruct ¶
type IsoStruct struct { Spec Spec Mti MtiType Bitmap []int64 Elements ElementsType Tpdu []byte }
IsoStruct is an iso8583 container
func NewISOStruct ¶
NewISOStruct creates a new IsoStruct based on the content of the specfile provided
func (*IsoStruct) AddField ¶
AddField adds the provided iso8583 field into the current struct also updates the bitmap in the process
func (*IsoStruct) AddMTI ¶
AddMTI adds the provided iso8583 MTI into the current struct also updates the bitmap in the process
func (*IsoStruct) RemoveField ¶
type MtiType ¶
type MtiType struct {
// contains filtered or unexported fields
}
MtiType is the message type identifier type
type Spec ¶
type Spec struct {
// contains filtered or unexported fields
}
Spec contains a strutured description of an iso8583 spec properly defined by a spec file
func SpecFromFile ¶
SpecFromFile returns a brand new empty spec
type ValidationError ¶
type ValidationError struct {
// contains filtered or unexported fields
}
ValidationError happens when validation fails