config

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

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

Go to latest
Published: Oct 5, 2022 License: MIT Imports: 19 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 {
	DeliveryType     string                         `mapstructure:"deliveryType" env:"DeliveryType"`
	ServiceName      string                         `mapstructure:"serviceName" env:"ServiceName"`
	Logger           *logger.LogConfig              `mapstructure:"logger" envPrefix:"Logger_"`
	GRPC             *grpc.GrpcConfig               `mapstructure:"grpc" envPrefix:"GRPC_"`
	Http             *customEcho.EchoHttpConfig     `mapstructure:"http" envPrefix:"Http_"`
	Context          Context                        `mapstructure:"context" envPrefix:"Context_"`
	Postgresql       *postgres.Config               `mapstructure:"postgres" envPrefix:"Postgresql_"`
	GormPostgres     *gormPostgres.Config           `mapstructure:"gormPostgres" envPrefix:"GormPostgres_"`
	RabbitMQ         *config.RabbitMQConfig         `mapstructure:"rabbitmq" envPrefix:"RabbitMQ_"`
	Probes           probes.Config                  `mapstructure:"probes" envPrefix:"Probes_"`
	OTel             *otel.OpenTelemetryConfig      `mapstructure:"otel" envPrefix:"OTel_"`
	EventStoreConfig eventstroredb.EventStoreConfig `mapstructure:"eventStoreConfig" envPrefix:"EventStoreConfig_"`
}

func InitConfig

func InitConfig(environment string) (*Config, error)

func (*Config) GetMicroserviceName

func (cfg *Config) GetMicroserviceName() string

func (*Config) GetMicroserviceNameUpper

func (cfg *Config) GetMicroserviceNameUpper() string

type Context

type Context struct {
	Timeout int `mapstructure:"timeout" env:"Timeout"`
}

Jump to

Keyboard shortcuts

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