2023-07-08 11:28:06 +00:00
|
|
|
package config
|
|
|
|
|
|
|
|
import "os"
|
|
|
|
|
2023-07-19 18:25:42 +00:00
|
|
|
const (
|
2024-05-13 17:03:21 +00:00
|
|
|
SITE_CONFIG = "site_config"
|
|
|
|
ACT_PUB_CONF_NAME = "activity_pub"
|
2023-07-19 18:25:42 +00:00
|
|
|
)
|
|
|
|
|
2023-07-08 11:28:06 +00:00
|
|
|
type Config interface {
|
|
|
|
}
|
|
|
|
|
|
|
|
type EnvConfig struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func getEnvOrPanic(key string) string {
|
|
|
|
value, set := os.LookupEnv(key)
|
|
|
|
if !set {
|
|
|
|
panic("Environment variable " + key + " is not set")
|
|
|
|
}
|
|
|
|
return value
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewConfig() Config {
|
2023-07-16 19:48:39 +00:00
|
|
|
return &EnvConfig{}
|
2023-07-08 11:28:06 +00:00
|
|
|
}
|