config

package
v0.0.0-...-5aa55fc Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(conf Config)

Types

type AdminConfig

type AdminConfig struct {
	EthOwnerPriKey    string
	SolanaOwnerPriKey string
}

type AlarmConfig

type AlarmConfig struct {
	IM *IMConfig
}

type Config

type Config struct {
	Debug     *DebugConfig
	DB        *DBConfig
	Admin     *AdminConfig
	Redis     *RedisConfig
	Contracts []*ContractConf
	Expiry    time.Duration
	Schedule  *ScheduleConfig
	Ticker    *TickerConfig
	Alarm     *AlarmConfig
}

func Get

func Get() *Config

type ContractConf

type ContractConf struct {
	ChainId                    uint64
	EndpointURLs               []string
	PayTokenContractAddr       string
	PayTokenSymbol             string
	PayTokenDecimals           uint8
	PayTokenBlockNumber        uint64
	BlockNumberIntervalSeconds uint64
	PfTokenContractAddr        string
	PlpAddressPoolContractAddr string
	LiquidStakingContractAddr  string
	OwnerAddress               string
	OwnerPriKey                string
	MerchantPriKey             string
}

type DBConfig

type DBConfig struct {
	Host     string
	User     string
	Password string
	DbName   string
	Port     uint16
	TimeZone string
}

type DebugConfig

type DebugConfig struct {
	Enable  bool
	Verbose bool
}

type IMConfig

type IMConfig struct {
	Lark *LarkConfig
}

type LarkConfig

type LarkConfig struct {
	URL string
}

type RedisClientOpt

type RedisClientOpt struct {
	Network      string
	Addr         string
	Username     string
	Password     string
	DB           int
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	PoolSize     int
	TLSConfig    *tls.Config
}

type RedisClusterClientOpt

type RedisClusterClientOpt struct {
	Addrs        []string
	MaxRedirects int
	Username     string
	Password     string
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	TLSConfig    *tls.Config
}

type RedisConfig

type RedisConfig struct {
	RedisIsCluster     bool
	RedisClient        *RedisClientOpt
	RedisClusterClient *RedisClusterClientOpt
	Concurrency        int
	Queues             map[string]int
	ProcessIn          int
	MaxRetry           int
	Timeout            int
	Delay              int
}

type ScheduleConfig

type ScheduleConfig struct {
	RebaseTime string
	APRTime    string
}

type TickerConfig

type TickerConfig struct {
	WalletAssignInterval   time.Duration
	WalletTransferInterval time.Duration
	WalletAssignDBInterval time.Duration
	WalletInterval         time.Duration
	NotifyRetryIntervals   []time.Duration
}

Jump to

Keyboard shortcuts

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