Documentation ¶
Overview ¶
Package xdb is a simple wrapper for gorm client creation, it will create a gorm.DB with options
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfigFromAwsSecretsManager ¶ added in v0.0.2
LoadConfigFromAwsSecretsManager load config from aws secrets manager If you have multiple databases, you can manually call this function to load the config Otherwise, you can use the New function to load the config automatically(that will not change the config outside)
Types ¶
type Config ¶
type Config struct { SecretsManagerPath string Host string Port string Username string Password string Name string TranslateError bool `default:"true"` UseSlog bool `default:"true"` }
Config is the configuration for the postgres database If SecretsManagerPath is set (and Host not set), it will try to load the config from aws ssm parameter store, ignore other fields. But the Name field will override the DB Name field in SecretsManager value, if both are set.
Click to show internal directories.
Click to hide internal directories.