config

package
v0.0.0-...-a24ed69 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ApplicationConf = func() *application_conf {

		application.Env.Load()

		var (
			a application_conf // Create an instance of application_conf to hold the decoded configuration.
		)

		if err := envdecode.StrictDecode(&a); err != nil {
			log.Fatalf("failed to decode app conf's envs - %v", err.Error())
		}

		return &a
	}()
)

ApplicationConf is a singleton instance of application_conf, initialized with the application's environment configuration.

View Source
var (
	PostgresProperties = func() *postgres_properties {

		application.Env.Load()

		var (
			p postgres_properties // Create an instance of postgres_properties to hold the decoded configuration.
		)

		if err := envdecode.StrictDecode(&p); err != nil {
			log.Fatalf("failed to decode postgres' envs: %v", err.Error())
		}

		return &p
	}()
)

PostgresProperties is a singleton instance of postgres_properties, initialized with the PostgreSQL database configuration from environment variables.

View Source
var (
	RedisProperties = func() *redis_properties {

		application.Env.Load()

		var (
			p redis_properties // Create an instance of redis_pro
		)

		if err := envdecode.StrictDecode(&p); err != nil {
			log.Fatalf("failed to decode redis's envs: %s", err)
		}

		return &p
	}()
)

RedisProperties is a singleton instance of redis_properties, initialized with the Redis configuration from environment variables.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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