config

package
v0.0.0-...-43db901 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationServerRouter

func ApplicationServerRouter(db *gorm.DB) *mux.Router

func DefaultConfiguration

func DefaultConfiguration()

func NodeRouter

func NodeRouter() *mux.Router

func PoolManagerRouter

func PoolManagerRouter(db *gorm.DB) *mux.Router

Types

type BlockchainConfig

type BlockchainConfig struct {
	Provider           string
	MarketAddress      string
	PoolUrl            string
	PoolManagerAddress string
}

type Configuration

type Configuration struct {
	Version    string
	Build      int
	Blockchain BlockchainConfig
	P2P        P2PConfig
	Directory  struct {
		Base   string
		Wallet string
	}
	NodeManager struct {
		Config ConfigurationOptions
	}
	PoolManager struct {
		Database DatabaseConfig
		Config   ConfigurationOptions
	}
	ApplicationServer struct {
		Database DatabaseConfig
		Config   ConfigurationOptions
	}
}

func ViperConfiguration

func ViperConfiguration() Configuration

Returns the singleton viper config as a parsed struct

type ConfigurationOptions

type ConfigurationOptions struct {
	Name        string
	DisplayName string
	Description string
	Debug       bool
	Port        string
}

type DatabaseConfig

type DatabaseConfig struct {
	Type     string
	Host     string
	Port     string
	User     string
	Name     string
	Password string
	SSL      bool
}

func (*DatabaseConfig) GormConnectionString

func (databaseConfig *DatabaseConfig) GormConnectionString() string

type P2PConfig

type P2PConfig struct {
	BindPort       int
	AdvertisePort  int
	VerifyOverride bool
}

Jump to

Keyboard shortcuts

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