types.go 968 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package tools
  2. import "html/template"
  3. type MailServer struct {
  4. Server, Email, Password string
  5. }
  6. type ViewHtml struct {
  7. Header template.HTML
  8. Nav template.HTML
  9. }
  10. type IndexData struct {
  11. ViewHtml
  12. Folders map[string]int
  13. Mails interface{}
  14. MailPagelist []*MailItem
  15. CurrentPage int
  16. Fid string
  17. NextPage, PrePage string
  18. NumPages template.HTML
  19. }
  20. type ViewData struct {
  21. Folders map[string]int
  22. HtmlBody template.HTML
  23. MailItem
  24. }
  25. type MailItem struct {
  26. Subject string
  27. Fid string
  28. Id uint32
  29. From string
  30. To string
  31. Body string
  32. Date string
  33. }
  34. type MailPageList struct {
  35. MailItems []*MailItem
  36. }
  37. type JsonResult struct {
  38. Code int `json:"code"`
  39. Msg string `json:"msg"`
  40. }
  41. type JsonListResult struct {
  42. JsonResult
  43. Result interface{} `json:"result"`
  44. }
  45. type SmtpBody struct {
  46. Smtp string
  47. From string
  48. To []string
  49. Password string
  50. Subject string
  51. Body string
  52. }