Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseMessage ¶
func ParseMessage(buf []byte) (Message, *Delimiters, error)
ParseMessage takes input as a `[]byte`, and returns the whole message, the control characters (as `*Delimiters`), and maybe an error.
Types ¶
type Component ¶
type Component []Subcomponent
type Delimiters ¶
type Delimiters struct {
Field, Component, Repeat, Escape, Subcomponent byte
}
type ErrInvalidHeader ¶
type ErrInvalidHeader error
ErrInvalidHeader is returned if a message doesn't start with "MSH", or the header isn't exactly the correct length, or any of the control characters aren't unique
type ErrInvalidQuery ¶
type ErrInvalidQuery error
type ErrTooShort ¶
type ErrTooShort error
ErrTooShort is returned if a message isn't long enough to contain a valid header
type Query ¶
type Query struct { Segment string HasSegmentOffset bool SegmentOffset int HasField bool Field int HasFieldOffset bool FieldOffset int HasComponent bool Component int HasSubComponent bool SubComponent int }
func ParseQuery ¶
type Subcomponent ¶
type Subcomponent string