Yuriko/pkg/config/config.go

24 lines
439 B
Go
Raw Normal View History

2021-05-07 12:46:41 +00:00
package config
import (
"log"
"os"
)
type Config struct {
TypesenseApiUrl string
TypesenseApiKey string
WebhookApiKey string
}
var CurrentConfig Config
func InitializeConfig() {
CurrentConfig = Config{
TypesenseApiUrl: os.Getenv("TYPESENSE_API_URL"),
TypesenseApiKey: os.Getenv("TYPESENSE_API_KEY"),
WebhookApiKey: os.Getenv("WEBHOOK_API_KEY"),
}
log.Println("Typesense API URL: " + os.Getenv("TYPESENSE_API_URL"))
}