force.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package model
  2. import "go-common/library/time"
  3. //Force ...
  4. type Force struct {
  5. ID int64 `json:"id"`
  6. AppID int64 `json:"app_id"`
  7. Hostname string `json:"hostname"`
  8. IP string `json:"ip"`
  9. Version int64 `json:"version"`
  10. Operator string `json:"operator"`
  11. Ctime time.Time `json:"ctime"`
  12. Mtime time.Time `json:"mtime"`
  13. }
  14. // TableName force.
  15. func (Force) TableName() string {
  16. return "force"
  17. }
  18. //CreateForceReq ...
  19. type CreateForceReq struct {
  20. Env string `form:"env" validate:"required"`
  21. Zone string `form:"zone" validate:"required"`
  22. Build string `form:"build" validate:"required"`
  23. TreeID int64 `form:"tree_id" validate:"required"`
  24. Version int64 `form:"version"`
  25. Hosts string `form:"hosts"`
  26. }
  27. //ClearForceReq ...
  28. type ClearForceReq struct {
  29. Env string `form:"env" validate:"required"`
  30. Zone string `form:"zone" validate:"required"`
  31. Build string `form:"build" validate:"required"`
  32. TreeID int64 `form:"tree_id" validate:"required"`
  33. Hosts string `form:"hosts"`
  34. }
  35. //MapHosts ...
  36. type MapHosts map[string]string