blindedrouting

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Overview

Package blindedrouting provides blinded routing features for agents.

Index

Constants

View Source
const (
	// CommandName package command name.
	CommandName = "blindedrouting"
	// SendDIDDocRequest command name.
	SendDIDDocRequest = "SendDIDDocRequest"
	// SendRegisterRouteRequest command name.
	SendRegisterRouteRequest = "SendRegisterRouteRequest"
)
View Source
const (
	// InvalidRequestErrorCode is typically a code for validation errors.
	InvalidRequestErrorCode = command.Code(iota + command.MediatorClient)

	// SendDIDDocRequestError is typically a code for send did doc request command errors.
	SendDIDDocRequestError
	// SendRegisterRouteRequestError is typically a code for send register route request command errors.
	SendRegisterRouteRequestError
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command is controller command for blinded routing.

func New

func New(p Provider, msgHandler ariescmd.MessageHandler, notifier ariescmd.Notifier) (*Command, error)

New returns new blinded routing controller command instance.

func (*Command) GetHandlers

func (c *Command) GetHandlers() []command.Handler

GetHandlers returns list of all commands supported by this controller command.

func (*Command) SendDIDDocRequest

func (c *Command) SendDIDDocRequest(rw io.Writer, req io.Reader) command.Error

SendDIDDocRequest sends DID doc request over a connection.

func (*Command) SendRegisterRouteRequest

func (c *Command) SendRegisterRouteRequest(rw io.Writer, req io.Reader) command.Error

SendRegisterRouteRequest sends register route request as a response to reply from send DID doc request.

type DIDDocRequest

type DIDDocRequest struct {
	// ConnectionID of the connection to which did doc request to be sent.
	ConnectionID string `json:"connectionID"`
}

DIDDocRequest model

This is used for sending did doc request to a connection.

type DIDDocResponse

type DIDDocResponse struct {
	// Payload contains response from a connection for a did doc request.
	Payload json.RawMessage `json:"payload"`
}

DIDDocResponse model

This is the response from a connection for a did doc request.

type Provider

type Provider interface {
	VDRegistry() vdr.Registry
	Messenger() service.Messenger
	ProtocolStateStorageProvider() storage.Provider
	StorageProvider() storage.Provider
	KMS() kms.KeyManager
}

Provider describes dependencies for this command.

type RegisterRouteRequest

type RegisterRouteRequest struct {
	// MessageID of the conversation to which this request has to be sent.
	// '@id' of the previous response from this connection to maintain communication context.
	// previous response --> message ID from DIDDocResponse.
	MessageID string `json:"messageID"`

	// DIDDocument to be shared in raw format.
	DIDDocument json.RawMessage `json:"didDoc"`
}

RegisterRouteRequest model

This is used for sending register route request, often sent as response to `DIDDocResponse` from send did doc request command.

type RegisterRouteResponse

type RegisterRouteResponse struct {
	// Payload contains response from a connection for a register route request.
	Payload json.RawMessage `json:"payload"`
}

RegisterRouteResponse model

This is the response for a register route request sent.

Jump to

Keyboard shortcuts

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