io

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDirectory

func CopyDirectory(src, des string) error

CopyDirectory uses the cp -r command to copy files or directories from src to des.

func DeleteDirectory

func DeleteDirectory(path string) error

func DeleteFile

func DeleteFile(path string) error

func DownloadAndExtractTarGz

func DownloadAndExtractTarGz(url, tarballPath, extractedPath string) error

func ExtractTarGz

func ExtractTarGz(src string, dest string) error

func FileOrFolderExists

func FileOrFolderExists(path string) bool

FileOrFolderExists checks if a file or folder exists at the given path.

func LibraryPathEnv added in v0.3.5

func LibraryPathEnv(binaryDir string) (string, string, error)

func SetLibraryPaths

func SetLibraryPaths(binaryDir string) error

func WithLibraryPathEnv added in v0.3.5

func WithLibraryPathEnv(env []string, binaryDir string) ([]string, error)

func WriteFile

func WriteFile(path, content string) error

Types

type Key added in v0.1.2

type Key struct {
	Address     string             `json:"address"`
	Mnemonic    string             `json:"mnemonic"`
	AddressType crypto.AddressType `json:"address_type"`
}

func GenerateKey added in v0.1.2

func GenerateKey(hrp string, addressType crypto.AddressType) (*Key, error)

func NewKey added in v0.1.2

func NewKey(address, mnemonic string, addressType crypto.AddressType) *Key

func RecoverKey added in v0.1.2

func RecoverKey(hrp, mnemonic string, addressType crypto.AddressType) (*Key, error)

type KeyFile added in v0.1.2

type KeyFile map[string]*Key

func NewKeyFile added in v0.1.2

func NewKeyFile() KeyFile

func (KeyFile) AddKey added in v0.1.2

func (k KeyFile) AddKey(name string, key *Key)

func (KeyFile) GetMnemonic added in v0.1.2

func (k KeyFile) GetMnemonic(name string) string

func (KeyFile) Load added in v0.1.2

func (k KeyFile) Load(filePath string) error

Load tries to load an existing key file into the struct if the file exists

func (KeyFile) Write added in v0.1.2

func (k KeyFile) Write(filePath string) error

Jump to

Keyboard shortcuts

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