feat(db): disable redis and use local map to store values

This commit is contained in:
Anhgelus Morhtuuzh 2025-05-21 18:46:27 +02:00
parent 642025681b
commit ceffa15763
Signed by: anhgelus
GPG key ID: CAD341EFA92DDDE5
7 changed files with 27 additions and 110 deletions

View file

@ -9,10 +9,9 @@ import (
)
type Config struct {
Debug bool `toml:"debug"`
Author string `toml:"author"`
Redis *gokord.RedisCredentials `toml:"redis"`
Database *PostgresConfig `toml:"database"`
Debug bool `toml:"debug"`
Author string `toml:"author"`
Database *PostgresConfig `toml:"database"`
}
type PostgresConfig struct {
@ -55,14 +54,12 @@ func (c *Config) GetAuthor() string {
}
func (c *Config) GetRedisCredentials() *gokord.RedisCredentials {
return c.Redis
return nil
}
func (c *Config) SetDefaultValues() {
c.Debug = false
c.Author = "anhgelus"
c.Redis = &gokord.RedisCredentials{}
c.Redis.SetDefaultValues()
c.Database = &PostgresConfig{}
c.Database.SetDefaultValues()
}