endp

package
v0.30.20 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version2EndpSuffix = "-2"

	DIDLengthMax = 22
	DIDLengthMin = 21
)

Variables

This section is empty.

Functions

func IsDID

func IsDID(DID string) bool

func IsInEndpoints

func IsInEndpoints(endpointName string) bool

func IsUUID added in v0.30.14

func IsUUID(id string) bool

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 NewAddrFromPublic(ae service.Addr) *Addr

func NewClientAddr

func NewClientAddr(s string) (ea *Addr)

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 NewClientAddrWithKey(fullURL, verkey string) *Addr

func NewServerAddr

func NewServerAddr(s string) (ea *Addr)

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) AE

func (e *Addr) AE() service.Addr

AE returns Addr which includes URL + VerKey.

func (*Addr) Address

func (e *Addr) Address() string

func (*Addr) IsEncrypted

func (e *Addr) IsEncrypted() bool

func (*Addr) Key

func (e *Addr) Key() []byte

func (*Addr) PayloadTransportDID

func (e *Addr) PayloadTransportDID() string

func (*Addr) ReceiverDID

func (e *Addr) ReceiverDID() string

ReceiverDID returns actual agent PL receiver.

func (*Addr) String

func (e *Addr) String() string

func (*Addr) TestAddress

func (e *Addr) TestAddress() string

func (*Addr) Valid

func (e *Addr) Valid() bool

Jump to

Keyboard shortcuts

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