config

package
v4.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config provides the configuration for the application. Note that most configuration is provided by the underlying trueblocks-core packages, so the items here are mostly for the application itself.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ConfigPath  string            `json:"configPath"`
	ProviderMap map[string]string `json:"providers"` // chain to provider
	Targets     []string          `json:"targets"`
}

Config carries various configuration related settings

func (*Config) CachePath

func (c *Config) CachePath() string

CachePath returns the path to the TrueBlocks cache directory

func (*Config) IndexPath

func (c *Config) IndexPath() string

Index returns the path to the TrueBlocks Unchained Index directory

func (*Config) String

func (c *Config) String() string

String returns the string representation of the Config type

func (*Config) TmplChain

func (c *Config) TmplChain() string

TmplChain is used used to establish the app's config file (with a GoLang template) if it doesn't exist. Note this is a shortened form of the trueblocks-core's configuration file which will be used if it already exists.

type TmplEntry

type TmplEntry struct {
	Chain          string `json:"chain"`
	ChainId        string `json:"chainId"`
	LocalExplorer  string `json:"localExplorer"`
	RemoteExplorer string `json:"remoteExplorer"`
	RpcProvider    string `json:"rpcProvider"`
	Symbol         string `json:"symbol"`
}

TmplEntry represents the configuration of a single chain in the configurion file's template.

Jump to

Keyboard shortcuts

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