Ingen beskrivning
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

response.go 800B

1234567891011121314151617181920212223242526272829303132333435
  1. package types
  2. import (
  3. "time"
  4. )
  5. // QueryRequest 查询请求
  6. type QueryRequest struct {
  7. SQL string `json:"sql"`
  8. Params map[string]interface{} `json:"params,omitempty"`
  9. }
  10. // QueryResult 查询结果
  11. type QueryResult struct {
  12. Success bool `json:"success"`
  13. Data interface{} `json:"data,omitempty"`
  14. Error string `json:"error,omitempty"`
  15. Count int `json:"count,omitempty"`
  16. Time string `json:"time,omitempty"`
  17. }
  18. // PageResult 分页结果
  19. type PageResult struct {
  20. QueryResult
  21. Page int `json:"page"`
  22. PageSize int `json:"pageSize"`
  23. Total int `json:"total"`
  24. }
  25. // HealthCheck 健康检查
  26. type HealthCheck struct {
  27. Status string `json:"status"`
  28. Timestamp time.Time `json:"timestamp"`
  29. Version string `json:"version"`
  30. }