Files
ozon-mock/internal/config/config.go
Rinat 842f87f576 Initial commit: ozon-mock Go server
- Mock Ozon Seller API endpoints
- Products, Postings, Finance, Returns, Analytics
- JSON fixtures for testing
- Docker support
- Gitea Actions CI/CD
2026-07-15 16:19:24 +03:00

25 lines
386 B
Go

package config
import "os"
type Config struct {
Port string
ClientID string
APIKey string
}
func Load() *Config {
return &Config{
Port: getEnv("PORT", "8080"),
ClientID: os.Getenv("OZON_CLIENT_ID"),
APIKey: os.Getenv("OZON_API_KEY"),
}
}
func getEnv(key, defaultVal string) string {
if val := os.Getenv(key); val != "" {
return val
}
return defaultVal
}