jsondef.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package main
  2. type ConfigJSON struct {
  3. Frontend FrontendJSON `json:"frontend"`
  4. Backend BackendJSON `json:"backend"`
  5. }
  6. type FrontendJSON struct {
  7. Enable bool `json:"enable"`
  8. EntryPoint string `json:"entry"`
  9. ListenAddr string `json:"listen"`
  10. WWWRoot string `json:"wwwroot"`
  11. BackendProxy BackendProxyJSON `json:"backend_proxy"`
  12. ShellLog LumberjackLoggerJSON `json:"shell_log"`
  13. }
  14. type BackendJSON struct {
  15. Enable bool `json:"enable"`
  16. EntryPoint string `json:"entry"`
  17. ListenAddr string `json:"listen"`
  18. ShellLog LumberjackLoggerJSON `json:"shell_log"`
  19. }
  20. type BackendProxyJSON struct {
  21. Prefix string `json:"prefix"`
  22. ProxyTaret string `json:"target"`
  23. }
  24. type LumberjackLoggerJSON struct {
  25. FileName string `json:"file"`
  26. MaxSize int `json:"max_size"`
  27. MaxAge int `json:"max_age"`
  28. MaxBackups int `json:"max_backups"`
  29. UseLocalTime bool `json:"use_local_time"`
  30. Compress bool `json:"compress_history"`
  31. }