config

package
v0.0.0-...-b8bafe8 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 5 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
	GetToDoServiceAddress() string
	GetRetryDelayConnect() time.Duration
	GetRetryAttemptsConnect() uint
}

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"`
	ToDoServiceAddress   string        `mapstructure:"TODO_SERVICE_ADDRESS"`
	RetryDelayConnect    time.Duration `mapstructure:"RETRY_DELAY_CONNECT"`
	RetryAttemptsConnect uint          `mapstructure:"RETRY_ATTEMPTS_CONNECT" `
}

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) GetRetryAttemptsConnect

func (s SampleConfig) GetRetryAttemptsConnect() uint

func (SampleConfig) GetRetryDelayConnect

func (s SampleConfig) GetRetryDelayConnect() time.Duration

func (SampleConfig) GetToDoServiceAddress

func (s SampleConfig) GetToDoServiceAddress() 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