Documentation ¶
Overview ¶
Package handshake is abstraction for agency level handshake protocol which on-boards new clients to the agency. These clients are called EAs (Edge Agents). Each EA has one CA to present it on the network. User can have many EAs which all are connected to one CA.
Index ¶
Constants ¶
const ( PingHandlerEndpoint = "ping" HandlerEndpoint = "handshake" )
These are the named endpoints for pre-cases which are handled without pre-encryption. Both, these constants and below table endpoints() are needed.
const ( AlreadyExistError = "UNKNOWN_TYPE" // Going to production so we don't tell this UnknownTypeError = "UNKNOWN_TYPE" )
Server's error messages
Variables ¶
This section is empty.
Functions ¶
func AnchorAgent ¶ added in v0.24.28
AnchorAgent Builds new trust anchor agent and its wallet. This is quite slow process. In future we could build them in advance to pool where we could allocate them when needed. Needs to wallet renaming or indexing.
func LoadRegistered ¶
LoadRegistered is usually called only once, in the startup of the service.
func RegisterGobs ¶
func RegisterGobs()
func SetSteward ¶
SetSteward sets the steward agent of this Agency.
Types ¶
type Agency ¶
type Agency struct{}
Agency is a singleton to encapsulate agency's settings data. It is the master class for all of the services offered by the agency. It includes registers for service handlers, aka endpoint handlers*. Most of the services are forwarded to CAs and just few of them are offered by the agency it self, like on-boarding.
The Agency is still in heavy construction. There are some fields which are obsolete or not used. The code base is not clean yet.
The Agency holds DID for the steward which it gets from the startup. It keeps track for CAs (handlers) and their wallets (register).
*Endpoint handler was very early concept of the development, when all of the endpoints, both agency endpoints and CA endpoints were routed by this agency and which where served by same URL root. The selection between agency endpoints and CA endpoints were done by reserved keywords for agency endpoints and DID values for CA endpoints. NOW the routing is done by URL paths where and /api/ endpoints are routed to Agency.APICall()
Please see server.go for more information about service endpoints.
var Hub *Agency