errors.go 1.8 KB

12345678910111213141516171819202122232425262728
  1. package self_check
  2. import "github.com/uozi-tech/cosy"
  3. var (
  4. e = cosy.NewErrorScope("self_check")
  5. ErrTaskNotFound = e.New(40400, "Task not found")
  6. ErrTaskNotFixable = e.New(40401, "Task is not fixable")
  7. ErrFailedToReadNginxConf = e.New(40402, "Failed to read nginx.conf")
  8. ErrParseNginxConf = e.New(50001, "Failed to parse nginx.conf")
  9. ErrNginxConfNoHttpBlock = e.New(40403, "Nginx conf no http block")
  10. ErrNginxConfNotIncludeSitesEnabled = e.New(40404, "Nginx conf not include sites-enabled")
  11. ErrNginxConfNoStreamBlock = e.New(40405, "Nginx conf no stream block")
  12. ErrNginxConfNotIncludeStreamEnabled = e.New(40406, "Nginx conf not include stream-enabled")
  13. ErrFailedToCreateBackup = e.New(50002, "Failed to create backup")
  14. ErrSitesAvailableNotExist = e.New(40407, "Sites-available directory not exist")
  15. ErrSitesEnabledNotExist = e.New(40408, "Sites-enabled directory not exist")
  16. ErrStreamAvailableNotExist = e.New(40409, "Streams-available directory not exist")
  17. ErrStreamEnabledNotExist = e.New(40410, "Streams-enabled directory not exist")
  18. ErrNginxConfNotIncludeConfD = e.New(40411, "Nginx conf not include conf.d directory")
  19. ErrDockerSocketNotExist = e.New(40412, "Docker socket not exist")
  20. ErrConfigDirNotExist = e.New(40413, "Config directory not exist")
  21. ErrConfigEntryFileNotExist = e.New(40414, "Config entry file not exist")
  22. ErrPIDPathNotExist = e.New(40415, "PID path not exist")
  23. ErrSbinPathNotExist = e.New(40416, "Sbin path not exist")
  24. ErrAccessLogPathNotExist = e.New(40417, "Access log path not exist")
  25. ErrErrorLogPathNotExist = e.New(40418, "Error log path not exist")
  26. )