config_loader

package
v0.0.0-...-e37bcbf Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: MIT Imports: 6 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 {
	Database        Database        `json:"database"`
	WebServer       WebServer       `json:"web_server"`
	InstancesMaster InstancesMaster `json:"instances_master"`
}

func Load

func Load() Config

func (Config) GetConnectionString

func (c Config) GetConnectionString() (string, error)

func (Config) GetConnectionStringWithoutDB

func (c Config) GetConnectionStringWithoutDB() (string, error)

func (Config) GetInstancesMasterIpAddress

func (c Config) GetInstancesMasterIpAddress() net.IPAddr

func (Config) GetInstancesMasterPort

func (c Config) GetInstancesMasterPort() string

func (Config) GetWebServerPort

func (c Config) GetWebServerPort() string

type ConfigError

type ConfigError struct {
	Msg string
}

func (ConfigError) Error

func (e ConfigError) Error() string

type Database

type Database struct {
	Vendor   string `json:"vendor"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
	DbName   string `json:"db_name"`
	SSLMode  string `json:"ssl_mode"`
}

type InstancesMaster

type InstancesMaster struct {
	IpAddress string `json:"ip_address"`
	Port      int    `json:"port"`
}

type WebServer

type WebServer struct {
	Port int `json:"port"`
}

Jump to

Keyboard shortcuts

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