Documentation ¶
Index ¶
- Variables
- func CloudAgentAPI() *caAPIProcessor
- func ProcessMsg(packet Packet, handler func(im, om didcomm.Msg) (err error)) (response didcomm.Payload)
- func SendPL(sendPipe sec.Pipe, task *Task, opl didcomm.Payload) (err error)
- type Continuator
- type Handler
- type HandlerFunc
- type Packet
- type PlHandlerFunc
- type ProtHandler
- type ProtProc
- type Receiver
- type Receivers
- type SeedHandler
- type Starter
- type Status
- type Task
Constants ¶
This section is empty.
Variables ¶
var ActiveRcvrs = Receivers{ Rcvrs: make(map[string]Receiver), }
var FileDownload = downloadFile
FileDownload is proxy function to route actual call to http or pseudo http in tests.
var Proc = &processor{}
var SendAndWaitReq = sendAndWaitHTTPRequest
SendAndWaitReq is proxy function to route actual call to http or pseudo http in tests.
Functions ¶
func ProcessMsg ¶
func ProcessMsg(packet Packet, handler func(im, om didcomm.Msg) (err error)) (response didcomm.Payload)
ProcessMsg is a helper function to input a decrypted Msg and write output. It builds the Payload ready.
Types ¶
type Continuator ¶
type Handler ¶
type Handler interface {
InOutPL(addr *endp.Addr, payload didcomm.Payload) (response didcomm.Payload, nonce string)
}
Handler can be Agency or Agent. They can input Payloads.
type HandlerFunc ¶
HandlerFunc is func type for protocol message handlers. We add them to protocol processors with the associated message type. See Payload.Type
type PlHandlerFunc ¶
PlHandlerFunc is func type for protocol message handlers. We add them to protocol processors with the associated message type. See Payload.Type
type ProtHandler ¶
ProtHandler is an interface for whole protocol. Where HandlerFunc is handler for protocol message, the protocol handler is whole protocol group, all of the same message family.
type ProtProc ¶
type ProtProc struct { Starter Handlers map[string]HandlerFunc Continuator Status }
ProtProc is a protocol processor. It is struct for protocol handlers. Instances of it are the actual protocol handlers. Just declare var and the needed msg handlers (HandlerFunc) and register it to the processor.
type Receiver ¶
type Receiver interface { Trans() txp.Trans MyCA() Receiver WorkerEA() Receiver ExportWallet(key string, exportPath string) (url string) BuildEndpURL() (endAddr string) RootDid() *ssi.DID SendNYM(targetDid *ssi.DID, submitterDid, alias, role string) (err error) LoadDID(did string) *ssi.DID WDID() string PwPipe(pw string) (cp sec.Pipe, err error) Wallet() int Pool() int FindPW(my string) (their string, pwname string, err error) CallEA(plType string, im didcomm.Msg) (om didcomm.Msg, err error) NotifyEA(plType string, im didcomm.MessageHdr) AttachAPIEndp(endp service.Addr) error AttachSAImpl(implID string, persistent bool) AddToPWMap(me, you *ssi.DID, name string) sec.Pipe SaveTheirDID(did, vk string, writeNYM bool) (err error) CAEndp(wantWorker bool) (endP *endp.Addr) AddPipeToPWMap(p sec.Pipe, name string) AddWs(msgDID string, ws *websocket.Conn) MasterSecret() (string, error) AutoPermission() bool }
type SeedHandler ¶
SeedHandler is preloaded cloud agent which is not initialized yet.
type Task ¶
type Task struct { Nonce string TypeID string // "connection", "issue-credential", "trust_ping" SenderEndp service.Addr ReceiverEndp service.Addr Message string ID string Info string // Pairwise ConnectionInvitation *invitation.Invitation // Issue credential CredentialAttrs *[]didcomm.CredentialAttribute CredDefID *string // Present proof ProofAttrs *[]didcomm.ProofAttribute }
func NewTaskFromConnectionResponse ¶
func NewTaskFromConnectionResponse(ipl didcomm.Payload, res *didexchange.Response) (t *Task)
NewTaskFromConnectionResponse creates a new task from raw PL
func NewTaskFromRequest ¶
func NewTaskFromRequest( ipl didcomm.Payload, req *didexchange.Request, connectionID string, ) ( t *Task, )
NewTaskFromRequest creates a new task from raw PL
func NewTaskRawPayload ¶
NewTaskRawPayload creates a new task from raw PL.
func (*Task) SwitchDirection ¶
func (t *Task) SwitchDirection()
SwitchDirection changes SenderEndp and ReceiverEndp data