Documentation ¶
Index ¶
- Constants
- type Messenger
- func (m *Messenger) HandleInbound(msg service.DIDCommMsgMap, ctx service.DIDCommContext) error
- func (m *Messenger) ReplyTo(msgID string, msg service.DIDCommMsgMap, opts ...service.Opt) error
- func (m *Messenger) ReplyToMsg(in, out service.DIDCommMsgMap, myDID, theirDID string, opts ...service.Opt) error
- func (m *Messenger) ReplyToNested(msg service.DIDCommMsgMap, opts *service.NestedReplyOpts) error
- func (m *Messenger) Send(msg service.DIDCommMsgMap, myDID, theirDID string, opts ...service.Opt) error
- func (m *Messenger) SendToDestination(msg service.DIDCommMsgMap, sender string, destination *service.Destination, ...) error
- type Provider
Constants ¶
const MessengerStore = "messenger_store"
MessengerStore is messenger store name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Messenger ¶
type Messenger struct {
// contains filtered or unexported fields
}
Messenger describes the messenger structure.
func NewMessenger ¶
NewMessenger returns a new instance of the Messenger.
func (*Messenger) HandleInbound ¶
func (m *Messenger) HandleInbound(msg service.DIDCommMsgMap, ctx service.DIDCommContext) error
HandleInbound handles all inbound messages.
func (*Messenger) ReplyTo ¶
ReplyTo replies to the message by given msgID. The function adds ~thread decorator to the message according to the given msgID. Do not provide a message with ~thread decorator. It will be rewritten.
func (*Messenger) ReplyToMsg ¶ added in v0.1.5
func (m *Messenger) ReplyToMsg(in, out service.DIDCommMsgMap, myDID, theirDID string, opts ...service.Opt) error
ReplyToMsg replies to the given message. The function adds ~thread decorator to the message according to the given msgID. Do not provide a message with ~thread decorator. It will be rewritten.
func (*Messenger) ReplyToNested ¶
func (m *Messenger) ReplyToNested(msg service.DIDCommMsgMap, opts *service.NestedReplyOpts) error
ReplyToNested sends the message by starting a new thread. Do not provide a message with ~thread decorator. It will be rewritten. The function adds ~thread decorator to the message according to the given threadID. NOTE: Given threadID (from opts or from message record) becomes parent threadID.
func (*Messenger) Send ¶
func (m *Messenger) Send(msg service.DIDCommMsgMap, myDID, theirDID string, opts ...service.Opt) error
Send sends the message by starting a new thread. Do not provide a message with ~thread decorator. It will be removed. Use ReplyTo function instead. It will keep ~thread decorator automatically.
func (*Messenger) SendToDestination ¶ added in v0.1.3
func (m *Messenger) SendToDestination(msg service.DIDCommMsgMap, sender string, destination *service.Destination, opts ...service.Opt) error
SendToDestination sends the message to given destination by starting a new thread. Do not provide a message with ~thread decorator. It will be removed. Use ReplyTo function instead. It will keep ~thread decorator automatically.