config

package
v0.0.0-...-7ee3c9b Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

* @File: config.config.go * @Description: Defines common service configuration * @Author: Yoan Yomba (yoanyombapro@gmail.com)

Index

Constants

View Source
const (
	ErrNameEmpty      = "Name is empty"
	ErrPasswordEmpty  = "Password is empty"
	ErrNotObjectIDHex = "String is not a valid hex representation of an ObjectId"
)

Status Text

View Source
const (
	StatusCodeUnknown = -1
	StatusCodeOK      = 1000
)

Status Code

Variables

This section is empty.

Functions

func Init

func Init()

func LoadConfig

func LoadConfig()

LoadConfig loads configuration from the config file

Types

type Configuration

type Configuration struct {
	Debug       string `json:"debug.addr"`
	Http        string `json:"http.addr"`
	Appdash     string `json:"appdash.addr"`
	ZipkinUrl   string `json:"zipkin.url"`
	UseZipkin   bool   `json:"zipkin.use"`
	Zipkin      string `json:"zipkin.addr"`
	DbType      string `json:"dbType"`
	DbAddress   string `json:"dbAddress"`
	DbName      string `json:"dbName"`
	DbSettings  string `json:"dbSettings"`
	Development bool   `json:"development"`
	Jwt         string `json:"jwtSecretPassword"`
	Issuer      string `json:"issuer"`
	ServiceName string `json:"serviceName"`
}

Configuration stores setting values

var (
	Config *Configuration
)

Config shares the global configuration

func (*Configuration) GetDatabaseConnectionString

func (Config *Configuration) GetDatabaseConnectionString() string

GetDatabaseConnectionString Creates a database connection string from the service configuration settings

Jump to

Keyboard shortcuts

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