messenger

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

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

func NewMessenger(ctx Provider) *Messenger

NewMessenger returns a new instance of the Messenger

func (*Messenger) HandleInbound

func (*Messenger) HandleInbound(msg service.DIDCommMsgMap, myDID, theirDID string) error

HandleInbound handles all inbound messages function behavior is flexible and can be modified by providing options

func (*Messenger) ReplyTo

func (*Messenger) ReplyTo(msgID string, msg service.DIDCommMsgMap) error

ReplyTo replies to the message by given msgID.

func (*Messenger) ReplyToNested

func (*Messenger) ReplyToNested(threadID string, msg service.DIDCommMsgMap, myDID, theirDID string) error

ReplyToNested sends the message by starting a new thread.

func (*Messenger) Send

func (m *Messenger) Send(msg service.DIDCommMsgMap, myDID, theirDID string) error

Send sends the message by starting a new thread.

type Provider

type Provider interface {
	OutboundDispatcher() dispatcher.Outbound
}

Provider contains dependencies for the Messenger

Jump to

Keyboard shortcuts

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