bertylinks

package
v2.230.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LinkWebPrefix      = "https://berty.tech/id#"
	LinkInternalPrefix = "BERTY://"
)

Variables

This section is empty.

Functions

func MarshalLink(link *messengertypes.BertyLink) (internal string, web string, err error)

MarshalLink returns shareable web and internal URLs.

The web URL is meant to: - be short, - have some parts that are human-readable, - to point to a sub-page of the berty.tech website where some JS code will parse the human-readable part.

The internal URL is meant to generate the most tiny QR codes. These QR codes can only be opened by a Berty app.

Marshal will return an error if the provided link does not contain all the mandatory fields; it may also filter-out some sensitive data.

func UnmarshalLink(uri string) (*messengertypes.BertyLink, error)

UnmarshalLink takes an URL generated by BertyLink.Marshal (or manually crafted), and returns a BertyLink object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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