envelopespec

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 6 Imported by: 16

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Envelope.ProtoReflect.Descriptor instead.

func (*Envelope) GetCausationId

func (x *Envelope) GetCausationId() string

func (*Envelope) GetCorrelationId

func (x *Envelope) GetCorrelationId() string

func (*Envelope) GetCreatedAt

func (x *Envelope) GetCreatedAt() string

func (*Envelope) GetData

func (x *Envelope) GetData() []byte

func (*Envelope) GetDescription

func (x *Envelope) GetDescription() string

func (*Envelope) GetMediaType

func (x *Envelope) GetMediaType() string

func (*Envelope) GetMessageId

func (x *Envelope) GetMessageId() string

func (*Envelope) GetPortableName

func (x *Envelope) GetPortableName() string

func (*Envelope) GetScheduledFor

func (x *Envelope) GetScheduledFor() string

func (*Envelope) GetSourceApplication

func (x *Envelope) GetSourceApplication() *Identity

func (*Envelope) GetSourceHandler

func (x *Envelope) GetSourceHandler() *Identity

func (*Envelope) GetSourceInstanceId

func (x *Envelope) GetSourceInstanceId() string

func (*Envelope) GetSourceSite added in v0.5.1

func (x *Envelope) GetSourceSite() *Identity

func (*Envelope) ProtoMessage

func (*Envelope) ProtoMessage()

func (*Envelope) ProtoReflect

func (x *Envelope) ProtoReflect() protoreflect.Message

func (*Envelope) Reset

func (x *Envelope) Reset()

func (*Envelope) String

func (x *Envelope) String() string

func (*Envelope) Validate

func (e *Envelope) Validate() error

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) Descriptor() ([]byte, []int)

Deprecated: Use Identity.ProtoReflect.Descriptor instead.

func (*Identity) GetKey

func (x *Identity) GetKey() string

func (*Identity) GetName

func (x *Identity) GetName() string

func (*Identity) ProtoMessage

func (*Identity) ProtoMessage()

func (*Identity) ProtoReflect

func (x *Identity) ProtoReflect() protoreflect.Message

func (*Identity) Reset

func (x *Identity) Reset()

func (*Identity) String

func (x *Identity) String() string

Jump to

Keyboard shortcuts

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