config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabaseConfig

func NewDatabaseConfig(config Config) db.Config

func NewMessageBrokerConfig

func NewMessageBrokerConfig(config Config) meesage_broker.Config

Types

type Config

type Config interface {
	GetAmqpAddress() string
	GetDatabaseDsn() string
	GetDbDriver() string
	GetUserServiceAddress() string
}

func New

func New() (Config, error)

type SampleConfig

type SampleConfig struct {
	AmqpAddress        string `mapstructure:"AMQP_ADDRESS"`
	DatabaseDsn        string `mapstructure:"DATABASE_DSN"`
	DBDriver           string `mapstructure:"DATABASE_DRIVER"`
	UserServiceAddress string `mapstructure:"USER_SERVICE_ADDRESS"`
}

func (SampleConfig) GetAmqpAddress

func (s SampleConfig) GetAmqpAddress() string

func (SampleConfig) GetDatabaseDsn

func (s SampleConfig) GetDatabaseDsn() string

func (SampleConfig) GetDbDriver

func (s SampleConfig) GetDbDriver() string

func (SampleConfig) GetUserServiceAddress

func (s SampleConfig) GetUserServiceAddress() string

Jump to

Keyboard shortcuts

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