config

package
v0.0.0-...-65ed5eb Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigDirName = ".hubl"
	GlobalKeyringDirName = "global"
)

Variables

View Source
var EmptyConfig = &Config{
	Chains:         map[string]*ChainConfig{},
	KeyringBackend: flags.DefaultKeyringBackend,
}

Functions

func GetConfigDir

func GetConfigDir() (string, error)

func Save

func Save(configDir string, config *Config) error

Types

type ChainConfig

type ChainConfig struct {
	GRPCEndpoints  []GRPCEndpoint `toml:"trusted-grpc-endpoints"`
	AddressPrefix  string         `toml:"address-prefix"`
	KeyringBackend string         `toml:"keyring-backend"`
}

type Config

type Config struct {
	Chains         map[string]*ChainConfig `toml:"chains"`
	KeyringBackend string                  `toml:"keyring-backend"`
}

func Load

func Load(configDir string) (*Config, error)

func (*Config) GetKeyringBackend

func (cfg *Config) GetKeyringBackend(chainName string) (string, error)

type GRPCEndpoint

type GRPCEndpoint struct {
	Endpoint string `toml:"endpoint"`
	Insecure bool   `toml:"insecure"`
}

Jump to

Keyboard shortcuts

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