config

package
v0.0.0-...-80b2b3e Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                                  int
	Mainnet                               NetworkConfig
	Florencenet                           NetworkConfig
	LogLevel                              string `envconfig:"LOG_LEVEL"`
	Production                            bool
	CounterIntervalSeconds                int
	SnapshotCheckIntervalMinutes          int
	FutureRightsIntervalMinutes           int
	VotingRollsIntervalMinutes            int
	DoubleBakingCheckIntervalMinutes      int
	DoubleEndorsementCheckIntervalMinutes int
	BakerRegistryCheckIntervalMinutes     int
	AssetsParseIntervalMinutes            int
	IPFSClient                            string
	NFTTokensParseIntervalSeconds         int
	InfoWSEventsIntervalMinutes           int
	SmtpHost                              string
	SmtpPort                              int
	SmtpUser                              string
	SmtpPassword                          string
	ThirdPartyBakersIntervalMinutes       int
	BakersSocialMediaHours                int
	WhalesUpdatesIntervalMinutes          int
}

Config stores the required configuration.

func Parse

func Parse() Config

Parse initializes the configuration from .env file or from environment.

type DbLogger

type DbLogger struct{}

DbLogger is a simple log wrapper for use with gorm and logrus.

func (*DbLogger) Print

func (*DbLogger) Print(args ...interface{})

Print directs the log ouput to trace level.

type NetworkConfig

type NetworkConfig struct {
	SqlConnectionString string
	NodeRpc             client.TransportConfig
}

Jump to

Keyboard shortcuts

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