configtypes

package
v6.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainGroup

type ChainGroup struct {
	Chain          string         `json:"chain" toml:"chain,omitempty"`
	ChainId        string         `json:"chainId" toml:"chainId"`
	IpfsGateway    string         `json:"ipfsGateway" toml:"ipfsGateway,omitempty"`
	KeyEndpoint    string         `json:"keyEndpoint" toml:"keyEndpoint,omitempty"`
	LocalExplorer  string         `json:"localExplorer" toml:"localExplorer,omitempty"`
	RemoteExplorer string         `json:"remoteExplorer" toml:"remoteExplorer,omitempty"`
	RpcProviderOld string         `json:"rpcProvider,omitempty" toml:"rpcProvider,omitempty"` // deprecated
	RpcProviders   []string       `json:"rpcProviders" toml:"rpcProviders,omitempty"`
	Symbol         string         `json:"symbol" toml:"symbol"`
	BlockTime      float64        `json:"blockTime" toml:"blockTime,omitempty"`
	Scrape         ScrapeSettings `json:"scrape" toml:"scrape"`
}

func (ChainGroup) GetRpcProvider

func (cg ChainGroup) GetRpcProvider() string

func (*ChainGroup) String

func (s *ChainGroup) String() string

type Config

type Config struct {
	Version   VersionGroup          `json:"version" toml:"version"`
	Settings  SettingsGroup         `json:"settings" toml:"settings"`
	Keys      map[string]KeyGroup   `json:"keys" toml:"keys"`
	Pinning   PinningGroup          `json:"pinning" toml:"pinning"`
	Unchained UnchainedGroup        `json:"unchained" toml:"unchained,omitempty" comment:"Do not edit these values unless instructed to do so."`
	Chains    map[string]ChainGroup `json:"chains" toml:"chains"`
}

func NewConfig

func NewConfig(cachePath, indexPath, defaultIpfs string) Config

func (*Config) String

func (s *Config) String() string

func (*Config) WriteFile

func (cfg *Config) WriteFile(outFn string, vers version.Version) error

WriteFile writes the toml config file from the given struct

type KeyGroup

type KeyGroup struct {
	License string `json:"license" toml:"license,omitempty"`
	ApiKey  string `json:"apiKey" toml:"apiKey"`
	Secret  string `json:"secret" toml:"secret,omitempty"`
	Jwt     string `json:"jwt" toml:"jwt,omitempty"`
}

func (*KeyGroup) String

func (s *KeyGroup) String() string

type NotifyGroup

type NotifyGroup struct {
	Url    string `json:"url,omitempty" toml:"url"`
	Author string `json:"author,omitempty" toml:"author"`
}

func (*NotifyGroup) String

func (s *NotifyGroup) String() string

type PinningGroup

type PinningGroup struct {
	GatewayUrl   string `json:"gatewayUrl" toml:"gatewayUrl" comment:"The pinning gateway to query when downloading the unchained index"`
	LocalPinUrl  string `json:"localPinUrl" toml:"localPinUrl" comment:"The local endpoint for the IPFS daemon"`
	RemotePinUrl string `json:"remotePinUrl" toml:"remotePinUrl" comment:"The remote endpoint for pinning on Pinata"`
}

func (*PinningGroup) String

func (s *PinningGroup) String() string

type ScrapeSettings

type ScrapeSettings struct {
	AppsPerChunk uint64 `json:"appsPerChunk" toml:"appsPerChunk"`
	SnapToGrid   uint64 `json:"snapToGrid" toml:"snapToGrid"`
	FirstSnap    uint64 `json:"firstSnap" toml:"firstSnap"`
	UnripeDist   uint64 `json:"unripeDist" toml:"unripeDist"`
	AllowMissing bool   `json:"allowMissing,omitempty" toml:"allowMissing"`
	ChannelCount uint64 `json:"channelCount,omitempty" toml:"channelCount"`
}

func (*ScrapeSettings) String

func (s *ScrapeSettings) String() string

func (*ScrapeSettings) TestLog

func (s *ScrapeSettings) TestLog(chain string, test bool)

type SettingsGroup

type SettingsGroup struct {
	CachePath      string      `json:"cachePath" toml:"cachePath" comment:"The location of the per chain caches"`
	IndexPath      string      `json:"indexPath" toml:"indexPath" comment:"The location of the per chain unchained indexes"`
	DefaultChain   string      `json:"defaultChain" toml:"defaultChain" comment:"The default chain to use if none is provided"`
	DefaultGateway string      `json:"defaultGateway" toml:"defaultGateway,omitempty"`
	Notify         NotifyGroup `json:"notify" toml:"notify"`
}

func (*SettingsGroup) String

func (s *SettingsGroup) String() string

type UnchainedGroup

type UnchainedGroup struct {
	PreferredPublisher string `` /* 132-byte string literal not displayed */
	SmartContract      string `json:"smartContract" toml:"smartContract,omitempty" comment:"The address of the current version of the Unchained Index"`
}

func (*UnchainedGroup) String

func (s *UnchainedGroup) String() string

type VersionGroup

type VersionGroup struct {
	Current string `json:"current" toml:"current" comment:"Do not edit"`
}

func (*VersionGroup) String

func (s *VersionGroup) String() string

Jump to

Keyboard shortcuts

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