Documentation
¶
Index ¶
- Constants
- func PeerToDnId(id libp2pPeer.ID) (pId string, dID uint64)
- type Store
- func (s *Store) FindAll() (result []*pb.Peer, err error)
- func (s *Store) FindByDecentralizedId(decentralizedId uint64) (*pb.Peer, error)
- func (s *Store) FindByDetails(key, value string) (result []*pb.Peer, err error)
- func (s *Store) FindByPeerId(peerId string) (*pb.Peer, error)
- func (s *Store) Insert(info *pb.Peer) error
- func (s *Store) Remove(peerId string) error
- func (s *Store) Save()
Constants ¶
View Source
const TABLE = "peers"
Variables ¶
This section is empty.
Functions ¶
func PeerToDnId ¶
func PeerToDnId(id libp2pPeer.ID) (pId string, dID uint64)
libp2p peer id to uint64. Some apps expect some identification in the form of an integer. This will make it so we are compatible.
Types ¶
type Store ¶
type Store struct { Self *pb.Peer SelfMutex sync.RWMutex Changed bool // contains filtered or unexported fields }
func (*Store) FindByDecentralizedId ¶
func (*Store) FindByDetails ¶
Click to show internal directories.
Click to hide internal directories.