config

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig added in v0.0.8

type AppConfig struct {
	Name        string
	Version     string
	Schema      string
	Host        string
	Environment string
}

AppConfig holds the configuration related to the application settings.

type AuthenticationConfig added in v0.0.3

type AuthenticationConfig struct {
	Key string
}

type Config

type Config struct {
	App            AppConfig
	Server         ServerConfig
	Database       DatabaseConfig
	Authentication AuthenticationConfig
	Observability  ObservabilityConfig
	JWT            JWTConfig
	Redis          RedisConfig
}

func LoadConfig

func LoadConfig(filename string) (Config, error)

LoadConfig loads the configuration from the specified filename.

func LoadConfigPath added in v0.0.8

func LoadConfigPath(path string) (Config, error)

LoadConfigPath loads the configuration from the specified path.

type DatabaseConfig

type DatabaseConfig struct {
	Host     string
	Port     int
	Name     string
	User     string
	Password string
}

DatabaseConfig holds the configuration for the database connection.

type JWTConfig added in v0.0.8

type JWTConfig struct {
	Key     string
	Expired int
	Label   string
}

type ObservabilityConfig added in v0.0.8

type ObservabilityConfig struct {
	Enable bool   // Indicates if observability is enabled.
	Mode   string // Specifies the observability mode.
}

ObservabilityConfig holds the configuration for observability settings.

type RedisConfig added in v0.0.9

type RedisConfig struct {
	Addr     string // The address of the database.
	Password string // The password for connecting to the database.
	DB       int    // The name of the database.
}

type ServerConfig

type ServerConfig struct {
	Port     string // The port on which the server will listen.
	Debug    bool   // Indicates if debug mode is enabled.
	TimeZone string // The time zone setting for the server.
}

ServerConfig holds the configuration for the server settings.

Jump to

Keyboard shortcuts

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