config

package
v0.0.0-...-3b7a923 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 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 ApiServer

type ApiServer struct {
	Host string `mapstructure:"GOSTY_APISERVER_SERVICE_HOST"`
	Port string `mapstructure:"GOSTY_APISERVER_SERVICE_PORT"`
}

type Configuration

type Configuration struct {
	ApiServer     ApiServer     `mapstructure:",squash"`
	Database      Database      `mapstructure:",squash"`
	MessageBroker MessageBroker `mapstructure:",squash"`
	FileServer    FileServer    `mapstructure:",squash"`
}

func LoadConfig

func LoadConfig(path string) *Configuration

type Database

type Database struct {
	DbUri    string `mapstructure:"MONGODB_URI"`
	Host     string `mapstructure:"MONGODB_SERVICE_HOST"`
	Port     string `mapstructure:"MONGODB_SERVICE_PORT"`
	Username string `mapstructure:"MONGODB_USERNAME"`
	Password string `mapstructure:"MONGODB_PASSWORD"`
	Name     string `mapstructure:"MONGODB_DATABASE"`
	Timeout  int    `mapstructure:"MONGODB_TIMEOUT"`
}

func (Database) GetDatabaseUri

func (d Database) GetDatabaseUri() string

type FileServer

type FileServer struct {
	Host string `mapstructure:"GOSTY_FILESERVER_SERVICE_HOST"`
	Port string `mapstructure:"GOSTY_FILESERVER_SERVICE_PORT"`
}

func (FileServer) GetFileServerUri

func (f FileServer) GetFileServerUri() string

type MessageBroker

type MessageBroker struct {
	MbUri    string `mapstructure:"RABBITMQ_URI"`
	Host     string `mapstructure:"RABBIT_RABBITMQ_SERVICE_HOST"`
	Port     string `mapstructure:"RABBIT_RABBITMQ_SERVICE_PORT"`
	Username string `mapstructure:"RABBITMQ_USERNAME"`
	Password string `mapstructure:"RABBITMQ_PASSWORD"`
}

func (MessageBroker) GetMessageBrokerUri

func (m MessageBroker) GetMessageBrokerUri() string

Jump to

Keyboard shortcuts

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