Documentation ¶
Index ¶
- Constants
- func EncodeCharsetToUTF8From(charmap *charmap.Charmap, data []byte) ([]byte, error)
- func EncodeUTF8ToCharset(charmap *charmap.Charmap, data []byte) []byte
- func Marshal(message interface{}, enc Encoding, tz Timezone, notation Notation) ([][]byte, error)
- func Unmarshal(messageData []byte, targetStruct interface{}, enc Encoding, tz Timezone) error
- type Encoding
- type LineBreak
- type MessageType
- type Notation
- type OutputRecord
- type OutputRecords
- type RETV
- type Timezone
Constants ¶
View Source
const ( ANNOTATION_DELIMITER = "delimiter" // annotation that triggers the delimiters in the scanner to be reset ANNOTATION_REQUIRED = "require" // field-annotation: by default all fields are optinal ANNOTATION_OPTIONAL = "optional" // record-annotation: by default all records are mandatory ANNOTATION_SEQUENCE = "sequence" // indicating that a sequence number should be generated (output only) ANNOTATION_LONGDATE = "longdate" )
View Source
const MAX_DEPTH = 44
View Source
const MAX_MESSAGE_COUNT = 44
View Source
const ShortNotation = 2
View Source
const StandardNotation = 1
Variables ¶
This section is empty.
Functions ¶
func EncodeCharsetToUTF8From ¶ added in v0.9.7
func EncodeUTF8ToCharset ¶ added in v0.9.7
Types ¶
type Encoding ¶
type Encoding int
const EncodingASCII Encoding = 2
const EncodingDOS852 Encoding = 6
const EncodingDOS855 Encoding = 7
const EncodingDOS866 Encoding = 8
const EncodingISO8859_1 Encoding = 9
const EncodingUTF8 Encoding = 1
const EncodingWindows1250 Encoding = 3
const EncodingWindows1251 Encoding = 4
const EncodingWindows1252 Encoding = 5
type LineBreak ¶
type LineBreak int
const CR LineBreak = 0x0D
const CRLF LineBreak = 0x0D0A
const LF LineBreak = 0x0A
type MessageType ¶ added in v1.1.1
type MessageType int
const MessageTypeOrdersAndResults MessageType = 3
const MessageTypeOrdersOnly MessageType = 2
const MessageTypeQuery MessageType = 1
const MessageTypeUnkown MessageType = -1
func IdentifyMessage ¶ added in v1.1.1
func IdentifyMessage(messageEncoded []byte, enc Encoding) (MessageType, error)
type Notation ¶
type Notation int
Notation defines how the output format is build
ShortNotation will skip all delimiters to the right of the last value StandardNotation will always produce as many delimiters as there are values in the export-format
type OutputRecord ¶
type OutputRecords ¶
type OutputRecords []OutputRecord
func (OutputRecords) Less ¶
func (or OutputRecords) Less(i, j int) bool
func (OutputRecords) Swap ¶
func (or OutputRecords) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.