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
This commit is contained in:
Rinat
2026-07-15 16:19:24 +03:00
commit 842f87f576
13 changed files with 1285 additions and 0 deletions

24
internal/config/config.go Normal file
View File

@ -0,0 +1,24 @@
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
}