Documentation ¶
Index ¶
- Constants
- func IsDID(DID string) bool
- func IsInEndpoints(endpointName string) bool
- func IsUUID(id string) bool
- type Addr
- func (e *Addr) AE() service.Addr
- func (e *Addr) Address() string
- func (e *Addr) IsEncrypted() bool
- func (e *Addr) Key() []byte
- func (e *Addr) PayloadTransportDID() string
- func (e *Addr) ReceiverDID() string
- func (e *Addr) String() string
- func (e *Addr) TestAddress() string
- func (e *Addr) Valid() bool
Constants ¶
const ( Version2EndpSuffix = "-2" DIDLengthMax = 22 DIDLengthMin = 21 )
Variables ¶
This section is empty.
Functions ¶
func IsInEndpoints ¶
Types ¶
type Addr ¶
type Addr struct { ID uint64 // ID is used to save Payloads arriving into the Address Service string // Service name like findy for http PlRcvr string // PL receiver it is CA-DID (our CA) todo: CA or WA? MsgRcvr string // Receivers CA-DID which is used for Edge/Cloud communication ConnID string // Connection ID EdgeToken string // Final communication endpoint, now used for invitation ID BasePath string // The base address of the URL VerKey string // Associated VerKey, used for sending Payloads to this address // contains filtered or unexported fields }
Addr is one of the central types in the Findy Agency. It handles the connections both for server and client. It caries mostly the URL specific stuff and DID parsing logic. There is also WebSocket connection. In the future there might be some other elements as well. This is right place. The name of the type should be changed to something else like CnxAddr, end need for exportation should be considered.
func NewAddrFromPublic ¶
func NewClientAddr ¶
NewClientAddr creates and fills new object from string which holds full URL of the address, including base address as well. This can and should be used for cases where whole endpoint address is given.
func NewClientAddrWithKey ¶
func NewServerAddr ¶
NewServerAddr creates and fills new object from string usually got from service calls like HTTP POST request. For that reason it cannot fill base address field.
func (*Addr) IsEncrypted ¶
func (*Addr) PayloadTransportDID ¶
func (*Addr) ReceiverDID ¶
ReceiverDID returns actual agent PL receiver.