base.go 584 B

123456789101112131415161718192021
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package base
  4. // HTTPError http请求出错时的数据结构
  5. type HTTPError struct {
  6. Code int `json:"code" example:"500" format:"int"`
  7. Message string `json:"message" example:"status bad request"`
  8. }
  9. type Header struct {
  10. Token string `header:"token"`
  11. }
  12. type Result struct {
  13. Code int `json:"code" default:"0" format:"int"` // 返回码
  14. Message string `json:"message" default:"success"` // 消息
  15. }
  16. type Empty struct{}