errors.go 1.2 KB

1234567891011121314151617181920
  1. package self_check
  2. import "github.com/uozi-tech/cosy"
  3. var (
  4. e = cosy.NewErrorScope("self_check")
  5. ErrTaskNotFound = e.New(4040, "Task not found")
  6. ErrFailedToReadNginxConf = e.New(4041, "Failed to read nginx.conf")
  7. ErrParseNginxConf = e.New(5001, "Failed to parse nginx.conf")
  8. ErrNginxConfNoHttpBlock = e.New(4042, "Nginx conf no http block")
  9. ErrNginxConfNotIncludeSitesEnabled = e.New(4043, "Nginx conf not include sites-enabled")
  10. ErrorNginxConfNoStreamBlock = e.New(4044, "Nginx conf no stream block")
  11. ErrNginxConfNotIncludeStreamEnabled = e.New(4045, "Nginx conf not include stream-enabled")
  12. ErrFailedToCreateBackup = e.New(5002, "Failed to create backup")
  13. ErrSitesAvailableNotExist = e.New(4046, "Sites-available directory not exist")
  14. ErrSitesEnabledNotExist = e.New(4047, "Sites-enabled directory not exist")
  15. ErrStreamAvailableNotExist = e.New(4048, "Streams-available directory not exist")
  16. ErrStreamEnabledNotExist = e.New(4049, "Streams-enabled directory not exist")
  17. ErrNginxConfNotIncludeConfD = e.New(4050, "Nginx conf not include conf.d directory")
  18. )