go/

directory
v2.52.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: Apache-2.0, MIT

README

Berty go/

go.dev reference Code coverage

Please, read the main README.md file first.

This folder contains most of the go code needed by the project.

Download

Main binary: go get -u berty.tech/berty/v2/go/cmd/berty

Fetch library to your go cache: go get -u berty.tech/berty/v2

Main components

  • ./cmd/...: binaries / entrypoints
    • go get -v berty.tech/berty/v2/go/cmd/berty
  • ./pkg/...: packages especially made to be imported by other projects
  • ./internal/: internal packages that can be useful to understand how things are working under the hood
    • you won't be able to import them directly from your projects; if you think that an internal package should be made public, open an issue
  • ./framework: bridges used by mobile apps

Directories

Path Synopsis
cmd
berty
Berty is the main CLI entrypoint to manage the Berty ecosystem (client, server, relay, dev)
Berty is the main CLI entrypoint to manage the Berty ecosystem (client, server, relay, dev)
berty/mini
Package mini contains main helpers to start a term-based Berty mini client
Package mini contains main helpers to start a term-based Berty mini client
rdvp
rdvp is a service to hold Berty's rendezvous point for faster peer discovery
rdvp is a service to hold Berty's rendezvous point for faster peer discovery
framework
bertybridge
Package bertybridge is the main gomobile entrypoint, used to generate iOS and Android frameworks
Package bertybridge is the main gomobile entrypoint, used to generate iOS and Android frameworks
internal
cryptoutil
Package cryptoutil contains generic & stateless crypto helpers
Package cryptoutil contains generic & stateless crypto helpers
gomodhack
Package gomodhack ensures that `go mod` detect some required dependencies This package should not be imported directly
Package gomodhack ensures that `go mod` detect some required dependencies This package should not be imported directly
grpcutil
Package grpcutil contains gRPC lazy codecs, messages and a pipe-based listener
Package grpcutil contains gRPC lazy codecs, messages and a pipe-based listener
handshake
Package handshake implements a capability-based handshake Handshake Sequence Diagram: --------------------------- Handshake vastely inspired by Scuttlebutt's Capability-based Handshake https://scuttlebot.io/more/protocols/shs.pdf - a, b are ephemeral key pairs generated by respectively Requester and Responder.
Package handshake implements a capability-based handshake Handshake Sequence Diagram: --------------------------- Handshake vastely inspired by Scuttlebutt's Capability-based Handshake https://scuttlebot.io/more/protocols/shs.pdf - a, b are ephemeral key pairs generated by respectively Requester and Responder.
ipfsutil
Package ipfsutil contains helpers around IPFS (logging, datastore, networking, core API, ...)
Package ipfsutil contains helpers around IPFS (logging, datastore, networking, core API, ...)
testutil
Package testutil contains testing helpers (logging, slow skipping)
Package testutil contains testing helpers (logging, slow skipping)
tinder
Package tinder is a multi-driver service backed by a cache ┌───────────────────────────────────────────────────┐ │ Tinder │ ┌───────────────────────┐ ┌───────────────┐ │ │ ┌────▶│ Driver DHT Ipfs │ │ Advertise │▶┼───┐ ┌────────────────┐ │ │ └───────────────────────┘ └───────────────┘ │ │ │ Backoff Cache │ │ │ ┌───────────────────────┐ ┌───────────────┐ │ ├────▶│ Discover │──┐ ┌───────────────┐ │ ├────▶│ Driver DHT Berty │ │ FindPeers │▶┼───┘ └────────────────┘ │ │Driver Manager │ │ │ └───────────────────────┘ └───────────────┘ │ ┌──────────────┴──▶│ (MultiDriver) │─┼──┤ ┌───────────────────────┐ ┌───────────────┐ │ │ └───────────────┘ │ ├────▶│Driver RendezVousPoint │ │ Unregister │▶┼──────────────┘ │ │ └───────────────────────┘ └───────────────┘ │ │ │ ┌───────────────────────┐ │ │ └────▶│Driver Local (ble/mdns)│ └───────────────────────────────────────────────────┘ └───────────────────────┘
Package tinder is a multi-driver service backed by a cache ┌───────────────────────────────────────────────────┐ │ Tinder │ ┌───────────────────────┐ ┌───────────────┐ │ │ ┌────▶│ Driver DHT Ipfs │ │ Advertise │▶┼───┐ ┌────────────────┐ │ │ └───────────────────────┘ └───────────────┘ │ │ │ Backoff Cache │ │ │ ┌───────────────────────┐ ┌───────────────┐ │ ├────▶│ Discover │──┐ ┌───────────────┐ │ ├────▶│ Driver DHT Berty │ │ FindPeers │▶┼───┘ └────────────────┘ │ │Driver Manager │ │ │ └───────────────────────┘ └───────────────┘ │ ┌──────────────┴──▶│ (MultiDriver) │─┼──┤ ┌───────────────────────┐ ┌───────────────┐ │ │ └───────────────┘ │ ├────▶│Driver RendezVousPoint │ │ Unregister │▶┼──────────────┘ │ │ └───────────────────────┘ └───────────────┘ │ │ │ ┌───────────────────────┐ │ │ └────▶│Driver Local (ble/mdns)│ └───────────────────────────────────────────────────┘ └───────────────────────┘
pkg
banner
Package banner generates ASCII picture of the Berty logo with a message /\ /\ / /\ ______ Lorem ipsum dolor sit amet, consectetur / /\/ / \/ | \ adipiscing elit, sed do eiusmod tempor | | \/ | ()| | incididunt ut labore et dolore magna aliqua.
Package banner generates ASCII picture of the Berty logo with a message /\ /\ / /\ ______ Lorem ipsum dolor sit amet, consectetur / /\/ / \/ | \ adipiscing elit, sed do eiusmod tempor | | \/ | ()| | incididunt ut labore et dolore magna aliqua.
bertydemo
Package bertydemo contains experimental code that may be used to test/show some high-level or low-level Berty related code in a CLI or a mobile app There are very few chances that you need to import it.
Package bertydemo contains experimental code that may be used to test/show some high-level or low-level Berty related code in a CLI or a mobile app There are very few chances that you need to import it.
bertyprotocol
Package bertyprotocol contains code for integrating the Berty protocol in your project See https://berty.tech/protocol for more information.
Package bertyprotocol contains code for integrating the Berty protocol in your project See https://berty.tech/protocol for more information.
bertytypes
This package is generated with Protobuf.
This package is generated with Protobuf.
errcode
Package errcode contains the list of Berty error codes
Package errcode contains the list of Berty error codes

Jump to

Keyboard shortcuts

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