utils

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TestDir = "./test_data"

TestDir test data directory

Variables

This section is empty.

Functions

func BasePath

func BasePath(name string) string

BasePath attempts to create a data directory using the given name within the gossamer directory within the user's HOME directory, returns absolute path or, if unable to locate HOME directory, returns within current directory

func ExpandDir

func ExpandDir(targetPath string) string

ExpandDir expands a tilde prefix path to a full home path

func GetGssmrGenesisPath

func GetGssmrGenesisPath() string

GetGssmrGenesisPath gets the gssmr human-readable genesis path

func GetGssmrGenesisRawPath added in v0.2.0

func GetGssmrGenesisRawPath() string

GetGssmrGenesisRawPath gets the gssmr raw genesis path

func GetKusamaGenesisPath added in v0.3.2

func GetKusamaGenesisPath() string

GetKusamaGenesisPath gets the kusama genesis path

func HomeDir

func HomeDir() string

HomeDir returns the user's current HOME directory

func KeystoreDir

func KeystoreDir(basepath string) (keystorepath string, err error)

KeystoreDir returns the absolute filepath of the keystore directory

func KeystoreFilepaths

func KeystoreFilepaths(basepath string) ([]string, error)

KeystoreFilepaths lists all the keys in the basepath/keystore/ directory and returns them as a list of filepaths

func KeystoreFiles

func KeystoreFiles(basepath string) ([]string, error)

KeystoreFiles returns the filenames of all the keys in the basepath's keystore

func NewTestBasePath

func NewTestBasePath(t *testing.T, name string) string

NewTestBasePath create new test data directory

func NewTestDir

func NewTestDir(t *testing.T) string

NewTestDir create new test data directory

func PathExists

func PathExists(p string) bool

PathExists returns true if the named file or directory exists, otherwise false

func RemoveTestDir

func RemoveTestDir(t *testing.T)

RemoveTestDir removes the test data directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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