utils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPathRoot is the path to the default config dir location.
	DefaultApiPathRoot = "~/"
	// DefaultConfigFile is the filename of the configuration file
	DefaultApiConfigFile = ".config"
	// EnvDir is the environment variable used to change the path root.
	EnvDir = "BTFS_PATH"
)

Variables

This section is empty.

Functions

func GetPeerId

func GetPeerId() string

func GetPrivateKey

func GetPrivateKey() string

func GetPublicKey

func GetPublicKey() string

func GetSessionSignature added in v0.2.1

func GetSessionSignature() string

func LoadApiConfig

func LoadApiConfig() error

Precondition: Call This function when any of the member variables of the ApiConfig object has zero value.

func RandString

func RandString(n int) string

func SetSessionSignature added in v0.2.1

func SetSessionSignature(sessionSig string)

Types

type ApiConfigStruct

type ApiConfigStruct struct {
	PrivateKey       string
	PeerId           string
	PublicKey        string
	SessionSignature string
}
var ApiConfig ApiConfigStruct

Jump to

Keyboard shortcuts

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