message

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 DICOMMeta added in v1.0.0

type DICOMMeta struct {
	CallingAE string
	CalledAE  string
}

type DatabaseMeta added in v1.0.0

type DatabaseMeta struct {
	Query  string
	Params map[string]any
}

type FTPMeta added in v1.0.0

type FTPMeta struct {
	Filename  string
	Directory string
}

type FileMeta added in v1.0.0

type FileMeta struct {
	Filename  string
	Directory string
}

type HTTPMeta added in v1.0.0

type HTTPMeta struct {
	Headers     map[string]string
	QueryParams map[string]string
	PathParams  map[string]string
	Method      string
	StatusCode  int
}

type KafkaMeta added in v1.0.0

type KafkaMeta struct {
	Headers   map[string]string
	Topic     string
	Key       string
	Partition int
	Offset    int64
}

type Message

type Message struct {
	ID            string
	CorrelationID string
	ChannelID     string
	Raw           []byte
	Transport     string
	ContentType   ContentType
	HTTP          *HTTPMeta
	File          *FileMeta
	FTP           *FTPMeta
	Kafka         *KafkaMeta
	TCP           *TCPMeta
	SMTP          *SMTPMeta
	DICOM         *DICOMMeta
	Database      *DatabaseMeta
	Metadata      map[string]any
	Timestamp     time.Time
}

func New

func New(channelID string, raw []byte) *Message

func (*Message) EnsureHTTP added in v1.0.0

func (m *Message) EnsureHTTP() *HTTPMeta

EnsureHTTP initializes the HTTP meta if nil and returns it.

type Response

type Response struct {
	StatusCode int
	Body       []byte
	Headers    map[string]string
	Error      error
}

type SMTPMeta added in v1.0.0

type SMTPMeta struct {
	From    string
	To      []string
	Subject string
	CC      []string
	BCC     []string
}

type TCPMeta added in v1.0.0

type TCPMeta struct {
	RemoteAddr string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL