Documentation
¶
Index ¶
- Variables
- func ParseMessage(buf []byte) (Message, *Delimiters, error)
- func ParseMessageWithSeperator(buf []byte, sep byte) (Message, *Delimiters, error)
- type Component
- type Delimiters
- type ErrInvalidHeader
- type ErrTooShort
- type Field
- type Message
- func (m *Message) Pack(in interface{}) (err error)
- func (m Message) Query(query string) (res string, err error)
- func (m Message) QuerySlice(query string) ([]string, error)
- func (m Message) Segment(name string, offset int) Segment
- func (m Message) Segments(name string) []Segment
- func (m *Message) SetString(query string, value string) error
- func (m Message) String() string
- func (m Message) Unpack(out interface{}) (err error)
- type Query
- type RepeatedComponent
- type RepeatedField
- type Segment
Constants ¶
This section is empty.
Variables ¶
View Source
var Locale *time.Location
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.
func ParseMessageWithSeperator ¶
func ParseMessageWithSeperator(buf []byte, sep byte) (Message, *Delimiters, error)
Types ¶
type Delimiters ¶
type Delimiters struct {
Field, Component, Repeat, Escape, RepeatedComponent 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 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 IsRestField bool Field int HasRepeatedField bool RepeatedField int HasComponent bool IsRestComponent bool Component int HasRepeatedComponent bool IsRestRepeatedComponent bool RepeatedComponent int }
func ParseQuery ¶
type RepeatedComponent ¶
type RepeatedComponent string
type RepeatedField ¶
type RepeatedField []Component
func (RepeatedField) SliceOfStrings ¶
func (f RepeatedField) SliceOfStrings() []string
func (RepeatedField) String ¶
func (f RepeatedField) String() string
Click to show internal directories.
Click to hide internal directories.