context

package
v0.0.0-...-64dd8ac Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BDDContext

type BDDContext struct {
	OutOfBandClients   map[string]*outofband.Client
	OutOfBandV2Clients map[string]*outofbandv2.Client
	DIDExchangeClients map[string]*didexchange.Client
	RouteClients       map[string]*mediator.Client
	RouteCallbacks     map[string]chan interface{}
	PublicDIDDocs      map[string]*did.Doc
	PublicKeys         map[string]*jwk.JWK
	PublicEncKeys      map[string][]byte // TODO: PublicEndKeys values are never set.
	KeyHandles         map[string]interface{}
	PublicDIDs         map[string]string
	PeerDIDs           map[string]string
	Agents             map[string]*aries.Aries
	AgentCtx           map[string]*bddcontext.Provider
	MessageRegistrar   map[string]*msghandler.Registrar
	Messengers         map[string]service.Messenger
	Args               map[string]string
	ConnectionIDs      map[string]map[string]string
	// contains filtered or unexported fields
}

BDDContext is a global context shared between different test suites in bddtests.

func NewBDDContext

func NewBDDContext() *BDDContext

NewBDDContext create new BDDContext.

func (*BDDContext) DeleteSDKAgent

func (b *BDDContext) DeleteSDKAgent(agentName string)

DeleteSDKAgent deletes an SDK agent, clearing all of its BDDContext data.

func (*BDDContext) Destroy

func (b *BDDContext) Destroy()

Destroy BDD context.

func (*BDDContext) GetConnectionID

func (b *BDDContext) GetConnectionID(agent, target string) string

GetConnectionID gets the connection ID for agent's connection to target, or the empty string if there is none.

func (*BDDContext) GetControllerURL

func (b *BDDContext) GetControllerURL(agentID string) (string, bool)

GetControllerURL returns controller url registered for given agent id.

func (*BDDContext) GetWebSocketConn

func (b *BDDContext) GetWebSocketConn(agentID string) (*websocket.Conn, bool)

GetWebSocketConn returns websocket connection for given agent ID for web notifications.

func (*BDDContext) GetWebhookURL

func (b *BDDContext) GetWebhookURL(agentID string) (string, bool)

GetWebhookURL returns webhook url registered for given agent id.

func (*BDDContext) OwnerOfDID

func (b *BDDContext) OwnerOfDID(didStr string) string

OwnerOfDID helper function for finding an agent name that has a given DID within the bdd context.

func (*BDDContext) ReadFromWebSocket

func (b *BDDContext) ReadFromWebSocket(agentID string) <-chan *Incoming

ReadFromWebSocket reads from WebSocket.

func (*BDDContext) RegisterControllerURL

func (b *BDDContext) RegisterControllerURL(agentID, url string)

RegisterControllerURL registers given url to agent id for controller.

func (*BDDContext) RegisterWebSocketConn

func (b *BDDContext) RegisterWebSocketConn(agentID string, conn *websocket.Conn)

RegisterWebSocketConn registers given websocket connection to agent id for web notifications.

func (*BDDContext) RegisterWebhookURL

func (b *BDDContext) RegisterWebhookURL(agentID, url string)

RegisterWebhookURL registers given url to agent id for webhook.

func (*BDDContext) SaveConnectionID

func (b *BDDContext) SaveConnectionID(agent, target, connID string)

SaveConnectionID sets the connection ID for agent's connection to target.

type Incoming

type Incoming struct {
	ID      string                `json:"id"`
	Topic   string                `json:"topic"`
	Message service.DIDCommMsgMap `json:"message"`
}

Incoming represents WebSocket event message.

Jump to

Keyboard shortcuts

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