Documentation
¶
Index ¶
- Constants
- type Messenger
- func (m *Messenger) HandleInbound(msg service.DIDCommMsgMap, myDID, theirDID string) error
- func (m *Messenger) ReplyTo(msgID string, msg service.DIDCommMsgMap) error
- func (m *Messenger) ReplyToMsg(in, out service.DIDCommMsgMap, myDID, theirDID string) error
- func (m *Messenger) ReplyToNested(msg service.DIDCommMsgMap, opts *service.NestedReplyOpts) error
- func (m *Messenger) Send(msg service.DIDCommMsgMap, myDID, theirDID string) error
- func (m *Messenger) SendToDestination(msg service.DIDCommMsgMap, sender string, destination *service.Destination) error
- type Provider
Constants ¶
const (
// MessengerStore is messenger store name.
MessengerStore = "messenger_store"
)
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, myDID, theirDID string) error
HandleInbound handles all inbound messages.
func (*Messenger) ReplyTo ¶
func (m *Messenger) ReplyTo(msgID string, msg service.DIDCommMsgMap) error
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 ¶
func (m *Messenger) ReplyToMsg(in, out service.DIDCommMsgMap, myDID, theirDID string) 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) 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 ¶
func (m *Messenger) SendToDestination(msg service.DIDCommMsgMap, sender string, destination *service.Destination) 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.