config

package
v0.0.0-...-99f7857 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: AGPL-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 Config

type Config struct {
	PostgresConfig struct {
		DB       string
		User     string
		Password string
		Host     string
		Port     int
		TLS      bool
		Timezone string
		GormDSN  string
	}

	RedisConfig struct {
		Host     string
		Port     int
		User     string
		Password string
	}

	HTTPConfig struct {
		HTTPAddr string
	}

	// ChainConfig is hardncoded for now
	ChainConfig struct {
		// Worth is the value of coins per mb
		Worth float64

		// InitialCoins is the number of coins initially given to the user while registration
		InitialCoins float64
	}

	// Database holds a gorm.DB instance for access with the handler
	Database *gorm.DB

	// Redis holds the global redis pool and connection
	Redis *redis.Client
}

Config holds the structure for the application config

func (*Config) LoadConfig

func (c *Config) LoadConfig()

LoadConfig loads the config from the environment file

Jump to

Keyboard shortcuts

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