Documentation ¶
Index ¶
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 ¶
Types ¶
type Continuator ¶
type Creator ¶ added in v0.24.29
type Creator func(header *TaskHeader, protocol *pb.Protocol) (Task, error)
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 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 { Creator 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) 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) 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) MasterSecret() (string, error) AutoPermission() bool }
type SeedHandler ¶
SeedHandler is preloaded cloud agent which is not initialized yet.
type TaskBase ¶ added in v0.24.29
type TaskBase struct { Task TaskHeader }
func (*TaskBase) ConnectionID ¶ added in v0.24.29
func (*TaskBase) ReceiverEndp ¶ added in v0.24.29
func (*TaskBase) Role ¶ added in v0.24.29
func (t *TaskBase) Role() pb.Protocol_Role
func (*TaskBase) SetReceiverEndp ¶ added in v0.24.29
type TaskHeader ¶ added in v0.24.29
type TaskHeader struct { TaskID string TypeID string ProtocolTypeID string ProtocolRole pb.Protocol_Role ConnID string Sender service.Addr Receiver service.Addr }
func (*TaskHeader) SwitchDirection ¶ added in v0.24.29
func (t *TaskHeader) SwitchDirection()
SwitchDirection changes SenderEndp and ReceiverEndp data