github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/protocol/networking-connection-storage.go (about) 1 /* For license and copyright information please see the LEGAL file in the code repository */ 2 3 package protocol 4 5 type LoadConnection interface { 6 GetConnectionByPeerAddr(addr [16]byte) (conn Connection, err Error) 7 // A connection can use just by single app node, so user can't use same connection to connect other node before close connection on usage node. 8 GetConnectionByUserIDDelegateUserID(userID, delegateUserID [16]byte) (conn Connection, err Error) 9 GetConnectionsByUserID(userID [16]byte) (conns []Connection, err Error) 10 GetConnectionByDomain(domain string) (conn Connection, err Error) 11 12 RegisterConnection(conn Connection) (err Error) 13 CloseConnection(conn Connection) (err Error) 14 RevokeConnection(conn Connection) (err Error) 15 } 16 17 /* Security data */ 18 // Cipher() Cipher