Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultGrpcPort = "44044" DefaultWalletServicePort = "40404" DefaultPostgresPort = "5432" DefaultTokenExpire = time.Hour * 24 DefaultCacheExpire = time.Minute DefaultENV = "local" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigDB ¶
type ConfigDB struct { DBHost string DBPort string DBUser string DBPassword string DBName string DBSSLMode string }
ConfigDB holds the configuration settings for the PostgreSQL database connection.
func NewConfigDB ¶
func NewConfigDB(dbHost, dbPort, dbUser, dbPassword, dbName, dbSSLMode, serverPort string) *ConfigDB
NewConfigDB creates a new ConfigDB instance with the provided values.
func NewEnvConfigDB ¶
NewEnvConfigDB loads configuration from a .env file and returns a ConfigDB instance.
type ServerConfig ¶
type ServerConfig struct { Env string TokenExpire string CacheExpire string Servers map[string]Server }
func NewServerConfig ¶
func NewServerConfig(env, tokenExp, cacheExp string, servers ...Server) *ServerConfig
func NewServerEnvConfig ¶
func NewServerEnvConfig(configPath string) *ServerConfig
Click to show internal directories.
Click to hide internal directories.