config

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiServerConfig added in v0.0.20

type ApiServerConfig struct {
	Host     string
	Port     int
	ApiKey   string
	CacheTTL time.Duration
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

func FromData

func FromData(data []byte) (Config, error)

func FromFile

func FromFile(path string) (Config, error)

func (*Config) GetFiat

func (c *Config) GetFiat() string

func (*Config) GetFiatMin

func (c *Config) GetFiatMin() float32

func (*Config) GetFiatSymbol

func (c *Config) GetFiatSymbol() string

func (*Config) GetHttpClient

func (c *Config) GetHttpClient() *http.Client

func (*Config) GetTokenConfigs

func (c *Config) GetTokenConfigs() []TokenConfig

func (*Config) GetWallets

func (c *Config) GetWallets() []Wallet

type ProviderConfig

type ProviderConfig struct {
	Name   string              `yaml:"name"`
	Key    string              `yaml:"key"`
	Secret string              `yaml:"secret"`
	Ignore []string            `yaml:"ignore"`
	Rename []map[string]string `yaml:"rename"`
}

type TelegramBotConfig

type TelegramBotConfig struct {
	ApiToken       string
	ChatId         int64
	UpdateInterval time.Duration
}

type TokenConfig

type TokenConfig struct {
	Symbol   string `yaml:"symbol"`
	GeckoId  string `yaml:"geckoid"`
	Contract string `yaml:"contract"`
}

type TokenFilter

type TokenFilter struct {
	Symbol  string
	Address string
	Config  TokenConfig
}

type Wallet

type Wallet struct {
	Name     string
	Provider ProviderConfig
	Filters  []TokenFilter
}

Jump to

Keyboard shortcuts

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