configuration

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROJECT_NAME    string = "populate-redis"
	PROJECT_VERSION string = "1.0.0"
	LOGS_PATH       string = "logs/log.json" // Path of the logs
)

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(cfg *Config, logger *zap.Logger)

ReadConfig read json file and convert into config struct

Types

type Config

type Config struct {
	Redis RedisConfig `json:"redis"`
}

Config: Configuration of the application

type RedisConfig

type RedisConfig struct {
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Password string `json:"password"`
	Database int64  `json:"database"`
}

RedisConfig : Configuration of redis to get a connection to a redis database

Jump to

Keyboard shortcuts

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