Yuriko/pkg/config/config.go
2021-05-07 19:46:41 +07:00

24 lines
439 B
Go

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"))
}