Skip to content

Latest commit

 

History

History
75 lines (50 loc) · 4.45 KB

project_structure.md

File metadata and controls

75 lines (50 loc) · 4.45 KB

Project Structure

Summary

The mobile bindings make use of gomobile which is Golang's official mobile support tool.

As gomobile is experimental, these bindings have been developed within its constraints of which the most notable are type restrictions.

The Golang code in this project contains wrappers for all Aries-Framework-Go controllers. The structs and method signatures used in these wrappers have been designed to optimise the user experience regardless of gomobile's limitations.

The entrypoint of this project is main.go.

Agent Controller Types

A mobile app that uses the generated SDK from this project has the option to use a local agent or a remote agent.

A local agent will handle all operations within the generated SDK.

A remote agent will forward all operations to an Aries agent deployed on an external server.

Here are examples for:

Interfaces

The AriesController interface defines all operations that a wrapped Aries agent must implement.

It uses the following interfaces:

Implementations

Local Agent

Aries implements the AriesController interface. It contains an Aries Framework object from the Aries-Framework-Go library and a map of handlers for all controllers and their operations that are implemented in controller/command.

The full implementation of the local agent's wrappers can be found in pkg/wrappers/command.

Remote Agent

Aries implements the AriesController interface. It contains a map of controller names to the endpoints of their operations. It also holds a URL to which it sends HTTP requests.

The full implementation of the remote agent's wrappers can be found in pkg/wrappers/rest.

Generating the UML diagram

A UML diagram illustrating the relationship between the interfaces and their implementations can be generated here using the following steps: