Documentation
¶
Overview ¶
Package paths provides centralized path management for devnet-builder.
Index ¶
- Constants
- func AccountKeyPath(homeDir string, index int) string
- func BinPath(homeDir string) string
- func BinaryCacheKeyPath(homeDir, networkType, cacheKey string) string
- func BinaryCacheNetworkPath(homeDir, networkType string) string
- func BinaryCachePath(homeDir string) string
- func BinarySymlinkPath(homeDir, binaryName string) string
- func BuildCacheKey(commitHash, configHash string) string
- func BuildExportName(networkType, commitHash string, blockHeight int64, timestamp string) string
- func BuildGenesisFileName(blockHeight int64, commitHash string) string
- func CachedBinaryMetadataPath(homeDir, networkType, cacheKey string) string
- func CachedBinaryPath(homeDir, networkType, cacheKey, binaryName string) string
- func ConfigPath(homeDir string) string
- func DefaultHomeDir() string
- func DevnetAccountsPath(homeDir string) string
- func DevnetGenesisPath(homeDir string) string
- func DevnetMetadataPath(homeDir string) string
- func DevnetPath(homeDir string) string
- func EnsureDir(path string) error
- func Exists(path string) bool
- func ExportGenesisPath(homeDir, exportName, genesisFileName string) string
- func ExportMetadataPath(homeDir, exportName string) string
- func ExportPath(homeDir, exportName string) string
- func ExportsPath(homeDir string) string
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsSymlink(path string) bool
- func IsValidCacheKey(cacheKey string) bool
- func NodeAppTomlPath(homeDir string, index int) string
- func NodeConfigPath(homeDir string, index int) string
- func NodeConfigTomlPath(homeDir string, index int) string
- func NodeDataPath(homeDir string, index int) string
- func NodeGenesisPath(homeDir string, index int) string
- func NodeKeyringPath(homeDir string, index int) string
- func NodeLogPath(nodeHomeDir, binaryName string) string
- func NodePIDPath(nodeHomeDir, binaryName string) string
- func NodePath(homeDir string, index int) string
- func PluginsPath(homeDir string) string
- func RelativeCacheTargetPath(cacheKey, binaryName string) string
- func SnapshotCacheKeyPath(homeDir, cacheKey string) string
- func SnapshotCachePath(homeDir string) string
- func SnapshotFilePath(homeDir, cacheKey, extension string) string
- func SnapshotMetadataPath(homeDir, cacheKey string) string
- func ValidatorKeyPath(homeDir string, index int) string
Constants ¶
View Source
const ( DevnetDir = "devnet" BinDir = "bin" CacheDir = "cache" BinaryCacheDir = "cache/binaries" SnapshotsDir = "snapshots" ExportsDir = "exports" PluginsDir = "plugins" )
Directory constants relative to home directory.
View Source
const ( ConfigDir = "config" DataDir = "data" KeyringDir = "keyring-test" )
Node subdirectory constants.
View Source
const ( ConfigFile = "config.toml" AppConfigFile = "app.toml" GenesisFile = "genesis.json" MetadataFile = "metadata.json" SnapshotMetaFile = "snapshot.meta.json" DefaultBinaryName = "binary" )
File name constants.
View Source
const ( CommitHashLength = 40 ConfigHashLength = 8 CacheKeySeparator = "-" )
Cache key format constants.
View Source
const DefaultHomeDirName = ".devnet-builder"
Variables ¶
This section is empty.
Functions ¶
func AccountKeyPath ¶
func BinaryCacheKeyPath ¶
func BinaryCacheNetworkPath ¶
func BinaryCachePath ¶
func BinarySymlinkPath ¶
func BuildCacheKey ¶
func BuildExportName ¶
func BuildGenesisFileName ¶
func CachedBinaryPath ¶
func ConfigPath ¶
func DefaultHomeDir ¶
func DefaultHomeDir() string
DefaultHomeDir returns $HOME/.devnet-builder or falls back to current directory.
func DevnetAccountsPath ¶
func DevnetGenesisPath ¶
func DevnetMetadataPath ¶
func DevnetPath ¶
func ExportGenesisPath ¶
func ExportMetadataPath ¶
func ExportPath ¶
func ExportsPath ¶
func IsValidCacheKey ¶
IsValidCacheKey validates cache key format: {commitHash(40hex)}-{configHash(8hex)}
func NodeAppTomlPath ¶
func NodeConfigPath ¶
func NodeConfigTomlPath ¶
func NodeDataPath ¶
func NodeGenesisPath ¶
func NodeKeyringPath ¶
func NodeLogPath ¶
func NodePIDPath ¶
func PluginsPath ¶
func RelativeCacheTargetPath ¶
RelativeCacheTargetPath returns relative path from bin dir to cache entry. cacheKey format: {networkType}/{commitHash}-{configHash}
func SnapshotCacheKeyPath ¶
func SnapshotCachePath ¶
func SnapshotFilePath ¶
func SnapshotMetadataPath ¶
func ValidatorKeyPath ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.