Documentation ¶
Index ¶
- Constants
- Variables
- type Batch
- type BatchPickup
- type Message
- type Noop
- type ProtocolService
- type Service
- func (s *Service) Accept(msgType string) bool
- func (s *Service) AddMessage(message []byte, theirDID string) error
- func (s *Service) BatchPickup(connectionID string, size int) (int, error)
- func (s *Service) HandleInbound(msg service.DIDCommMsg, ctx service.DIDCommContext) (string, error)
- func (s *Service) HandleOutbound(_ service.DIDCommMsg, _, _ string) (string, error)
- func (s *Service) Initialize(p interface{}) error
- func (s *Service) Name() string
- func (s *Service) Noop(connectionID string) error
- func (s *Service) StatusRequest(connectionID string) (*Status, error)
- type Status
- type StatusRequest
Constants ¶
const ( // MessagePickup defines the protocol name. MessagePickup = "messagepickup" // Spec defines the protocol spec. Spec = "https://didcomm.org/messagepickup/1.0/" // StatusMsgType defines the protocol propose-credential message type. StatusMsgType = Spec + "status" // StatusRequestMsgType defines the protocol propose-credential message type. StatusRequestMsgType = Spec + "status-request" // BatchPickupMsgType defines the protocol offer-credential message type. BatchPickupMsgType = Spec + "batch-pickup" // BatchMsgType defines the protocol offer-credential message type. BatchMsgType = Spec + "batch" // NoopMsgType defines the protocol request-credential message type. NoopMsgType = Spec + "noop" )
const (
// Namespace is namespace of messagepickup store name.
Namespace = "mailbox"
)
Variables ¶
var (
ErrConnectionNotFound = errors.New("connection not found")
)
ErrConnectionNotFound connection not found error.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct { Type string `json:"@type,omitempty"` ID string `json:"@id,omitempty"` Messages []*Message `json:"messages~attach"` Thread *decorator.Thread `json:"~thread,omitempty"` }
Batch a message that contains multiple waiting messages. https://github.com/hyperledger/aries-rfcs/tree/master/features/0212-pickup#batch
type BatchPickup ¶
type BatchPickup struct { Type string `json:"@type,omitempty"` ID string `json:"@id,omitempty"` BatchSize int `json:"batch_size"` Thread *decorator.Thread `json:"~thread,omitempty"` }
BatchPickup a request to have multiple waiting messages sent inside a batch message. https://github.com/hyperledger/aries-rfcs/tree/master/features/0212-pickup#batch-pickup
type Message ¶
type Message struct { ID string `json:"id"` AddedTime time.Time `json:"added_time"` Message []byte `json:"msg,omitempty"` }
Message messagepickup wrapper.
type Noop ¶
Noop message https://github.com/hyperledger/aries-rfcs/tree/master/features/0212-pickup#noop
type ProtocolService ¶
ProtocolService service interface for message pickup.
type Service ¶
Service for the messagepickup protocol.
func (*Service) AddMessage ¶
AddMessage add message to inbox.
func (*Service) BatchPickup ¶
BatchPickup a request to have multiple waiting messages sent inside a batch message.
func (*Service) HandleInbound ¶
func (s *Service) HandleInbound(msg service.DIDCommMsg, ctx service.DIDCommContext) (string, error)
HandleInbound handles inbound message pick up messages.
func (*Service) HandleOutbound ¶
HandleOutbound adherence to dispatcher.ProtocolService.
func (*Service) Initialize ¶ added in v0.1.8
Initialize initializes the Service. If Initialize succeeds, any further call is a no-op.
type Status ¶
type Status struct { Type string `json:"@type,omitempty"` ID string `json:"@id,omitempty"` MessageCount int `json:"message_count"` DurationWaited int `json:"duration_waited,omitempty"` LastAddedTime time.Time `json:"last_added_time,omitempty"` LastDeliveredTime time.Time `json:"last_delivered_time,omitempty"` LastRemovedTime time.Time `json:"last_removed_time,omitempty"` TotalSize int `json:"total_size,omitempty"` Thread *decorator.Thread `json:"~thread,omitempty"` }
Status details about pending messages https://github.com/hyperledger/aries-rfcs/tree/master/features/0212-pickup#status
type StatusRequest ¶
type StatusRequest struct { Type string `json:"@type,omitempty"` ID string `json:"@id,omitempty"` Thread *decorator.Thread `json:"~thread,omitempty"` }
StatusRequest sent by the recipient to the message_holder to request a status message./0212-pickup#statusrequest https://github.com/hyperledger/aries-rfcs/tree/master/features/0212-pickup#statusrequest