Add Wildberries product fetching and rate limiting functionality
This commit is contained in:
23
internal/config/redis.go
Normal file
23
internal/config/redis.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package config
|
||||
|
||||
import "os"
|
||||
|
||||
type RedisConfig struct {
|
||||
Host string
|
||||
Port string
|
||||
Password string
|
||||
Addr string
|
||||
}
|
||||
|
||||
func LoadRedisConfig() *RedisConfig {
|
||||
host := os.Getenv("REDIS_HOST")
|
||||
port := os.Getenv("REDIS_PORT")
|
||||
password := os.Getenv("REDIS_PASSWORD")
|
||||
addr := os.Getenv("REDIS_ADDR")
|
||||
return &RedisConfig{
|
||||
Host: host,
|
||||
Port: port,
|
||||
Password: password,
|
||||
Addr: addr,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user