Documentation
¶
Index ¶
- Variables
- type Envelope
- func (*Envelope) Descriptor() ([]byte, []int)deprecated
- func (x *Envelope) GetCausationId() string
- func (x *Envelope) GetCorrelationId() string
- func (x *Envelope) GetCreatedAt() string
- func (x *Envelope) GetData() []byte
- func (x *Envelope) GetDescription() string
- func (x *Envelope) GetMediaType() string
- func (x *Envelope) GetMessageId() string
- func (x *Envelope) GetPortableName() string
- func (x *Envelope) GetScheduledFor() string
- func (x *Envelope) GetSourceApplication() *Identity
- func (x *Envelope) GetSourceHandler() *Identity
- func (x *Envelope) GetSourceInstanceId() string
- func (x *Envelope) GetSourceSite() *Identity
- func (*Envelope) ProtoMessage()
- func (x *Envelope) ProtoReflect() protoreflect.Message
- func (x *Envelope) Reset()
- func (x *Envelope) String() string
- func (e *Envelope) Validate() error
- type Identity
Constants ¶
This section is empty.
Variables ¶
View Source
var File_github_com_dogmatiq_interopspec_envelopespec_envelope_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct {
// MessageId is a unique identifier for the message.
MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
// CausationId is the ID of the message that was the direct cause of the
// message in this envelope.
//
// It is equal to MessageId if this message was not caused by any other.
CausationId string `protobuf:"bytes,2,opt,name=causation_id,json=causationId,proto3" json:"causation_id,omitempty"`
// CorrelationId is the ID of the first ancestor of the message in this
// envelope that was not caused by another message.
//
// It is equal to MessageId if this message was not caused by any other.
CorrelationId string `protobuf:"bytes,3,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id,omitempty"`
// SourceSite is the (optional) identity of the site that the source
// application is running within.
//
// The site is used to disambiguate between messages from different
// installations of the same application.
SourceSite *Identity `protobuf:"bytes,13,opt,name=source_site,json=sourceSite,proto3" json:"source_site,omitempty"`
// SourceApplication is the identity of the Dogma application that produced
// the message in this envelope.
SourceApplication *Identity `protobuf:"bytes,4,opt,name=source_application,json=sourceApplication,proto3" json:"source_application,omitempty"`
// SourceHandler is the identity of the Dogma handler that produced the
// message in this envelope.
//
// It is the zero-value if the message was not produced by a handler.
SourceHandler *Identity `protobuf:"bytes,5,opt,name=source_handler,json=sourceHandler,proto3" json:"source_handler,omitempty"`
// SourceInstanceId is the ID of the aggregate or process instance that
// produced the message in this envelope.
//
// It is empty if the message was not produced by an aggregate or process
// handler.
SourceInstanceId string `protobuf:"bytes,6,opt,name=source_instance_id,json=sourceInstanceId,proto3" json:"source_instance_id,omitempty"`
// CreatedAt is the time at which the message was created, marshaled in
// RFC-3339 format, with nanoseconds.
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// ScheduledFor is the time at which a timeout message is scheduled to be
// handled, marshaled in RFC-3339 format, with nanoseconds.
//
// It is empty for command and event messages.
ScheduledFor string `protobuf:"bytes,8,opt,name=scheduled_for,json=scheduledFor,proto3" json:"scheduled_for,omitempty"`
// Description is an optional human-readable description of the message.
Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"`
// PortableName is the unique name used to identify messages of this type.
PortableName string `protobuf:"bytes,10,opt,name=portable_name,json=portableName,proto3" json:"portable_name,omitempty"`
// MediaType is a MIME media-type describing the content and encoding of the
// binary message data.
MediaType string `protobuf:"bytes,11,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
// Data is the binary message data.
//
// The data format is described by MediaType, the allowed values of both are
// outside the scope of this specification.
Data []byte `protobuf:"bytes,12,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
Envelope is a container for a marshaled message and it meta-data.
func (*Envelope) Descriptor
deprecated
func (*Envelope) GetCausationId ¶
func (*Envelope) GetCorrelationId ¶
func (*Envelope) GetCreatedAt ¶
func (*Envelope) GetDescription ¶
func (*Envelope) GetMediaType ¶
func (*Envelope) GetMessageId ¶
func (*Envelope) GetPortableName ¶
func (*Envelope) GetScheduledFor ¶
func (*Envelope) GetSourceApplication ¶
func (*Envelope) GetSourceHandler ¶
func (*Envelope) GetSourceInstanceId ¶
func (*Envelope) GetSourceSite ¶ added in v0.5.1
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
func (*Envelope) ProtoReflect ¶
func (x *Envelope) ProtoReflect() protoreflect.Message
func (*Envelope) Validate ¶
Validate returns an error if env is not well-formed.
Well-formedness means that all compulsory fields are populated, and that no incompatible fields are populated.
It is intentially fairly permissive, so that message meta-data can be obtained even if the message is unable to be handled.
It does not perform "deep" validation, such as ensuring messages, times, etc can be unmarshaled.
type Identity ¶
type Identity struct {
// Name is the entity's unique name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Key is the entity's immutable, unique key.
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
Identity represents the identity of an application or handler.
func (*Identity) Descriptor
deprecated
func (*Identity) ProtoMessage ¶
func (*Identity) ProtoMessage()
func (*Identity) ProtoReflect ¶
func (x *Identity) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.