Documentation
¶
Overview ¶
Package message contains the message creation strategies
Index ¶
- type EntityHint
- type HandleEntityAndDoMessage
- func (e *HandleEntityAndDoMessage) ToMessage(msg *message.Message) error
- func (e *HandleEntityAndDoMessage) WithEntity(entType v1.Entity, getByProps *properties.Properties) *HandleEntityAndDoMessage
- func (e *HandleEntityAndDoMessage) WithEntityID(entityID uuid.UUID) *HandleEntityAndDoMessage
- func (e *HandleEntityAndDoMessage) WithOriginator(originatorType v1.Entity, originatorProps *properties.Properties) *HandleEntityAndDoMessage
- func (e *HandleEntityAndDoMessage) WithProviderClassHint(providerClassHint string) *HandleEntityAndDoMessage
- func (e *HandleEntityAndDoMessage) WithProviderImplementsHint(providerHint string) *HandleEntityAndDoMessage
- type TypedProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityHint ¶
type EntityHint struct { ProviderImplementsHint string `json:"provider_implements_hint"` ProviderClassHint string `json:"provider_class_hint"` }
EntityHint is a hint that is used to help the entity handler find the entity.
type HandleEntityAndDoMessage ¶
type HandleEntityAndDoMessage struct { Entity TypedProps `json:"entity"` Originator TypedProps `json:"owner"` Hint EntityHint `json:"hint"` }
HandleEntityAndDoMessage is a message that is sent to the entity handler to refresh an entity and perform an action.
func NewEntityRefreshAndDoMessage ¶
func NewEntityRefreshAndDoMessage() *HandleEntityAndDoMessage
NewEntityRefreshAndDoMessage creates a new HandleEntityAndDoMessage struct.
func ToEntityRefreshAndDo ¶
func ToEntityRefreshAndDo(msg *message.Message) (*HandleEntityAndDoMessage, error)
ToEntityRefreshAndDo converts a Watermill message to a HandleEntityAndDoMessage struct.
func (*HandleEntityAndDoMessage) ToMessage ¶
func (e *HandleEntityAndDoMessage) ToMessage(msg *message.Message) error
ToMessage converts the HandleEntityAndDoMessage struct to a Watermill message.
func (*HandleEntityAndDoMessage) WithEntity ¶
func (e *HandleEntityAndDoMessage) WithEntity(entType v1.Entity, getByProps *properties.Properties) *HandleEntityAndDoMessage
WithEntity sets the entity and its properties.
func (*HandleEntityAndDoMessage) WithEntityID ¶
func (e *HandleEntityAndDoMessage) WithEntityID(entityID uuid.UUID) *HandleEntityAndDoMessage
WithEntityID sets the entity ID for the entity that will be used when looking up the entity.
func (*HandleEntityAndDoMessage) WithOriginator ¶
func (e *HandleEntityAndDoMessage) WithOriginator( originatorType v1.Entity, originatorProps *properties.Properties, ) *HandleEntityAndDoMessage
WithOriginator sets the owner entity and its properties.
func (*HandleEntityAndDoMessage) WithProviderClassHint ¶
func (e *HandleEntityAndDoMessage) WithProviderClassHint(providerClassHint string) *HandleEntityAndDoMessage
WithProviderClassHint sets the provider hint for the entity that will be used when looking up the entity. to the provider class
func (*HandleEntityAndDoMessage) WithProviderImplementsHint ¶
func (e *HandleEntityAndDoMessage) WithProviderImplementsHint(providerHint string) *HandleEntityAndDoMessage
WithProviderImplementsHint sets the provider hint for the entity that will be used when looking up the entity. to the provider implements hint