config

package
v0.0.0-...-42841ab Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 18 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Service      *service.Config                 `mapstructure:"service"`
	Logger       *logger.Config                  `mapstructure:"logger"`
	Jaeger       *jaeger.Config                  `mapstructure:"jaeger"`
	GRPC         *grpc.GrpcConfig                `mapstructure:"grpc"`
	Probes       *probes.Config                  `mapstructure:"probes"`
	NATS         *nats.Config                    `mapstructure:"nats"`
	EventStoreDb *eventstore_db.Config           `mapstructure:"eventStoreDb"`
	Projection   *eventstore_db.ProjectionConfig `mapstructure:"projection"`
	Http         *http.HttpConfig                `mapstructure:"http"`
	Redis        *redis.Config                   `mapstructure:"redis"`
	CockroachDb  *cockroach_db.Config            `mapstructure:"cockroach_db"`
	Kafka        *kafka.Config                   `mapstructure:"kafka"`
	MongoDB      *mongo_db.Config                `mapstructure:"mongoDb"`
}

func (*Config) GetCockroachDbConfig

func (cfg *Config) GetCockroachDbConfig() ICockroachDbConfig

func (*Config) GetESDBConfig

func (cfg *Config) GetESDBConfig() IESDBConfig

func (*Config) GetGRPCConfig

func (cfg *Config) GetGRPCConfig() IGRPCConfig

func (*Config) GetHttpConfig

func (cfg *Config) GetHttpConfig() IHttpConfig

func (*Config) GetJaegerConfig

func (cfg *Config) GetJaegerConfig() IJaegerConfig

func (*Config) GetKafkaConfig

func (cfg *Config) GetKafkaConfig() IKafkaConfig

func (*Config) GetLoggerConfig

func (cfg *Config) GetLoggerConfig() ILoggerConfig

func (*Config) GetMongoDbConfig

func (cfg *Config) GetMongoDbConfig() IMongoDbConfig

func (*Config) GetNATSConfig

func (cfg *Config) GetNATSConfig() INATSConfig

func (*Config) GetProbesConfig

func (cfg *Config) GetProbesConfig() IProbesConfig

func (*Config) GetProjectionConfig

func (cfg *Config) GetProjectionConfig() IProjectionConfig

func (*Config) GetRedisConfig

func (cfg *Config) GetRedisConfig() IRedisConfig

func (*Config) GetServiceConfig

func (cfg *Config) GetServiceConfig() IServiceConfig

type IAppConfig

type IAppConfig interface {
	GetServiceConfig() IServiceConfig
	GetProjectionConfig() IProjectionConfig
	GetNATSConfig() INATSConfig
	GetHttpConfig() IHttpConfig
	GetProbesConfig() IProbesConfig
	GetGRPCConfig() IGRPCConfig
	GetLoggerConfig() ILoggerConfig
	GetRedisConfig() IRedisConfig
	GetESDBConfig() IESDBConfig
	GetJaegerConfig() IJaegerConfig
	GetCockroachDbConfig() ICockroachDbConfig
	GetKafkaConfig() IKafkaConfig
	GetMongoDbConfig() IMongoDbConfig
}

func AppConfig

func AppConfig(configPath Path) (IAppConfig, error)

type ICockroachDbConfig

type ICockroachDbConfig interface {
	GetDSN() string
}

type IESDBConfig

type IESDBConfig interface {
	GetConnectionString() string
	GetUser() string
	GetPwd() string
}

IESDBConfig is the configuration interface for EventStoreDB

type IGRPCConfig

type IGRPCConfig interface {
	GetPort() string
	IsDevelopment() bool
}

type IHttpConfig

type IHttpConfig interface {
	GetPort() string
	IsDevelopment() bool
	GetBasePath() string
	GetAppPath() string
	WithDebugErrorsResponse() bool
	GetIgnoreLogUrls() []string
}

type IJaegerConfig

type IJaegerConfig interface {
	GetServiceName() string
	GetHostPort() string
	IsEnabled() bool
	UseLogSpans() bool
}

type IKafkaConfig

type IKafkaConfig interface {
	GetBootstrapServers() string
	GetGroupId() string
	GetAutoOffsetReset() string
	GetRetentionMs() string
}

type ILoggerConfig

type ILoggerConfig interface {
	GetLogLevel() string
	IsDevelopment() bool
	GetEncoder() string
}

type IMongoDbConfig

type IMongoDbConfig interface {
	GetUri() string
	GetUser() string
	GetPassword() string
	GetAuthMechanism() string
}

IMongoDbConfig is the interface for the mongo config.

type INATSConfig

type INATSConfig interface {
	GetUrl() string
	GetUser() string
	GetPwd() string
}

INATSConfig is and interface to nats configuration

type IProbesConfig

type IProbesConfig interface {
	GetReadinessPath() string
	GetLivenessPath() string
	GetPort() string
	GetPProf() string
	GetPrometheusPath() string
	GetCheckIntervalSeconds() int
}

type IProjectionConfig

type IProjectionConfig interface {
	GetPoolSize() int
	GetEventPrefix() string
	GetName() string
	GetGroup() string
}

type IRedisConfig

type IRedisConfig interface {
	GetUrl() string
}

IRedisConfig is an interface to the Redis Configuration

type IServiceConfig

type IServiceConfig interface {
	GetNamespace() string
	GetSubSystem() string
	GetServiceName() string
}

type Path

type Path string

Path We give the configuration path its own type, for DI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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