internal

package
v0.0.0-...-095f669 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigDirName = ".hubl"

Variables

This section is empty.

Functions

func InitCommand

func InitCommand(config *Config, configDir string) *cobra.Command

func RemoteCommand

func RemoteCommand(config *Config, configDir string) ([]*cobra.Command, error)

func RemoteErrorCommand

func RemoteErrorCommand(config *Config, configDir string, chain string, chainConfig *ChainConfig, err error) *cobra.Command

func RootCommand

func RootCommand() (*cobra.Command, error)

func SaveConfig

func SaveConfig(configDir string, config *Config) error

func SelectGRPCEndpoints

func SelectGRPCEndpoints(chain string) (string, error)

Types

type APIEntry

type APIEntry struct {
	Address  string
	Provider string
}

type ChainConfig

type ChainConfig struct {
	GRPCEndpoints []GRPCEndpoint `toml:"trusted-grpc-endpoints"`
}

type ChainInfo

type ChainInfo struct {
	ConfigDir     string
	Chain         string
	ModuleOptions map[string]*autocliv1.ModuleOptions
	ProtoFiles    *protoregistry.Files
	Context       context.Context
	Config        *ChainConfig
	// contains filtered or unexported fields
}

func NewChainInfo

func NewChainInfo(configDir string, chain string, config *ChainConfig) *ChainInfo

func (*ChainInfo) Load

func (c *ChainInfo) Load(reload bool) error

func (*ChainInfo) OpenClient

func (c *ChainInfo) OpenClient() (*grpc.ClientConn, error)

type ChainRegistryAPIs

type ChainRegistryAPIs struct {
	GRPC []*APIEntry `json:"grpc"`
}

type ChainRegistryEntry

type ChainRegistryEntry struct {
	APIs ChainRegistryAPIs `json:"apis"`
}

func GetChainRegistryEntry

func GetChainRegistryEntry(chain string) (*ChainRegistryEntry, error)

type Config

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

func LoadConfig

func LoadConfig(configDir string) (*Config, 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