config

package
v0.0.0-...-8c29382 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTemplate []byte

Functions

func GetDatabaseAdapter

func GetDatabaseAdapter(saveDataItem files.SaveDataItem, indexer indexer.Indexer, poolId int64, chainId string) db.Adapter

GetDatabaseAdapter returns the correct db.Adapter that is configured in the config file

func GetSaveDataItemAdapter

func GetSaveDataItemAdapter() files.SaveDataItem

GetSaveDataItemAdapter returns the SaveDataItem interface that is configured in the config file

func LoadConfig

func LoadConfig(configPath string)

func LoadDefaults

func LoadDefaults()

Types

type ConfigEndpoints

type ConfigEndpoints struct {
	Storage map[int][]string
	Chains  map[string][]string
}

type PoolsConfig

type PoolsConfig struct {
	BundleStartId int64
	ChainId       string
	Indexer       string
	PoolId        int64
	Slug          string
	ExcludeProof  bool `json:"excludeProof"`
}

func GetPoolsConfig

func GetPoolsConfig() []PoolsConfig

func (PoolsConfig) GetDatabaseAdapter

func (c PoolsConfig) GetDatabaseAdapter() db.Adapter

GetDatabaseAdapter returns the db.Adapter for each pool config as each pool has its own adapter

Jump to

Keyboard shortcuts

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