i2phelpers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2019 License: MIT Imports: 9 Imported by: 2

README

common functions for go-libp2p-transport using i2p(TCP AND UDP)

These live in the TCP transport folder, but they don't depend on it and are useful in both/other contexts.

Documentation

Index

Constants

View Source
const (
	// DefaultPathName is the default config dir name
	KeysPathName = ".ipfs"
	// DefaultPathRoot is the path to the default config dir location.
	KeysPathRoot = "~/" + KeysPathName
	// EnvDir is the environment variable used to change the path root.
	EnvDir = "KEYS_PATH"
)

Variables

This section is empty.

Functions

func CreateEepServiceKey

func CreateEepServiceKey() (i2pkeys.I2PKeys, error)

func EepServiceMultiAddr

func EepServiceMultiAddr() (*ma.Multiaddr, error)

func IsValidGarlicMultiAddr

func IsValidGarlicMultiAddr(a ma.Multiaddr) bool

IsValidGarlicMultiAddr is used to validate that a multiaddr is representing a I2P garlic service

func LoadKeys

func LoadKeys(keysPath string) (i2pkeys.I2PKeys, error)

LoadKeys loads keys into our keys from files in the keys directory

func Path

func Path(filename, extension string) (string, error)

func PathRoot

func PathRoot() (string, error)

PathRoot returns the default configuration root directory

func RandTunName

func RandTunName() string

RandTunName generates a random tunnel names to avoid collisions

Types

This section is empty.

Jump to

Keyboard shortcuts

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