Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResponseToIntuJSON ¶ added in v1.0.4
ResponseToIntuJSON converts a destination Response into IntuMessage JSON.
Types ¶
type ContentType ¶
type ContentType string
const ( ContentTypeRaw ContentType = "raw" ContentTypeJSON ContentType = "json" ContentTypeXML ContentType = "xml" ContentTypeCSV ContentType = "csv" ContentTypeHL7v2 ContentType = "hl7v2" ContentTypeHL7v3 ContentType = "hl7v3" ContentTypeFHIR ContentType = "fhir_r4" ContentTypeX12 ContentType = "x12" ContentTypeDICOM ContentType = "dicom" ContentTypeDelimited ContentType = "delimited" ContentTypeBinary ContentType = "binary" ContentTypeCCDA ContentType = "ccda" )
type DatabaseMeta ¶ added in v1.0.0
type Message ¶
type Message struct {
ID string
CorrelationID string
ChannelID string
Raw []byte
Transport string
ContentType ContentType
SourceCharset string // e.g. "iso-8859-1", "utf-16le"; empty means UTF-8
HTTP *HTTPMeta
File *FileMeta
FTP *FTPMeta
Kafka *KafkaMeta
TCP *TCPMeta
SMTP *SMTPMeta
DICOM *DICOMMeta
Database *DatabaseMeta
Metadata map[string]any
Timestamp time.Time
}
func FromIntuJSON ¶ added in v1.0.4
FromIntuJSON reconstructs a Message from IntuMessage JSON stored in content. Returns the Message with Raw set to the body, transport metadata restored. Falls back to treating data as a raw payload if it is not valid IntuMessage JSON.
func (*Message) ClearTransportMeta ¶ added in v1.0.4
func (m *Message) ClearTransportMeta()
ClearTransportMeta resets all transport-specific metadata fields so a destination connector can stamp fresh values without stale source metadata.
func (*Message) CloneWithRaw ¶ added in v1.0.4
CloneWithRaw returns a shallow copy of the message with Raw replaced.
func (*Message) EnsureHTTP ¶ added in v1.0.0
EnsureHTTP initializes the HTTP meta if nil and returns it.
func (*Message) ToIntuJSON ¶ added in v1.0.4
ToIntuJSON serializes the Message as an IntuMessage JSON envelope. If Raw is valid UTF-8 the body is stored as a string; otherwise it is base64-encoded to avoid data corruption in JSON.