user.go 858 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Copyright 2019 github.com. All rights reserved.
  2. // Use of this source code is governed by github.com.
  3. package v1
  4. import (
  5. "cp-system-management-gateway/param/base"
  6. )
  7. type LoginBody struct {
  8. User string `form:"user"`
  9. Password string `form:"password"`
  10. }
  11. type LoginRequest struct {
  12. base.Header
  13. LoginBody
  14. }
  15. type LoginData struct {
  16. Uid int64 `json:"uid"`
  17. Token string `json:"token"`
  18. User string `json:"user"`
  19. }
  20. type LoginResponse struct {
  21. base.Result
  22. Data LoginData `json:"data"`
  23. }
  24. type TokenRequest struct {
  25. base.Header
  26. }
  27. type TokenResponse struct {
  28. base.Result
  29. Data string `json:"data"`
  30. RefreshToken string `json:"refresh_token"`
  31. }
  32. type ResetPasswdBody struct {
  33. Old string `form:"old"`
  34. New string `form:"new"`
  35. }
  36. type ResetePasswdRequest struct {
  37. base.Header
  38. ResetPasswdBody
  39. }
  40. type ResetePasswdResponse struct {
  41. base.Result
  42. }