configuration

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeNow = func() time.Time { return time.Now() }

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerPort        string `json:"server_port"`
	Debug             bool   `json:"debug"`
	DisableHttpLogger bool   `json:"disable_http_logger"`
	EnableSwaggerUi   bool   `json:"enable_swagger_ui"`

	DatabaseSelection string `json:"database_selection"`

	MongoUrl                 string `json:"mongo_url"`
	MongoTable               string `json:"mongo_table"`
	MongoVariablesCollection string `json:"mongo_variables_collection"`
	PostgresConnString       string `json:"postgres_conn_string"`

	LogLevel string `json:"log_level"`
	// contains filtered or unexported fields
}

func Load

func Load(location string) (config Config, err error)

loads config from json in location and used environment variables (e.g KafkaUrl --> KAFKA_URL)

func (*Config) GetLogger added in v0.0.12

func (this *Config) GetLogger() *slog.Logger

Jump to

Keyboard shortcuts

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