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.

miscellaneous.go 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. // SearchResults results of a successful search
  5. type SearchResults struct {
  6. OK bool `json:"ok"`
  7. Data []*Repository `json:"data"`
  8. }
  9. // SearchError error of a failed search
  10. type SearchError struct {
  11. OK bool `json:"ok"`
  12. Error string `json:"error"`
  13. }
  14. // MarkupOption markup options
  15. type MarkupOption struct {
  16. // Text markup to render
  17. //
  18. // in: body
  19. Text string
  20. // Mode to render (comment, gfm, markdown, file)
  21. //
  22. // in: body
  23. Mode string
  24. // Context to render
  25. //
  26. // in: body
  27. Context string
  28. // Is it a wiki page ?
  29. //
  30. // in: body
  31. Wiki bool
  32. // File path for detecting extension in file mode
  33. //
  34. // in: body
  35. FilePath string
  36. }
  37. // MarkupRender is a rendered markup document
  38. // swagger:response MarkupRender
  39. type MarkupRender string
  40. // MarkdownOption markdown options
  41. type MarkdownOption struct {
  42. // Text markdown to render
  43. //
  44. // in: body
  45. Text string
  46. // Mode to render (comment, gfm, markdown)
  47. //
  48. // in: body
  49. Mode string
  50. // Context to render
  51. //
  52. // in: body
  53. Context string
  54. // Is it a wiki page ?
  55. //
  56. // in: body
  57. Wiki bool
  58. }
  59. // MarkdownRender is a rendered markdown document
  60. // swagger:response MarkdownRender
  61. type MarkdownRender string
  62. // ServerVersion wraps the version of the server
  63. type ServerVersion struct {
  64. Version string `json:"version"`
  65. }
  66. // GitignoreTemplateInfo name and text of a gitignore template
  67. type GitignoreTemplateInfo struct {
  68. Name string `json:"name"`
  69. Source string `json:"source"`
  70. }
  71. // LicensesListEntry is used for the API
  72. type LicensesTemplateListEntry struct {
  73. Key string `json:"key"`
  74. Name string `json:"name"`
  75. URL string `json:"url"`
  76. }
  77. // LicensesInfo contains information about a License
  78. type LicenseTemplateInfo struct {
  79. Key string `json:"key"`
  80. Name string `json:"name"`
  81. URL string `json:"url"`
  82. Implementation string `json:"implementation"`
  83. Body string `json:"body"`
  84. }
  85. // APIError is an api error with a message
  86. type APIError struct {
  87. Message string `json:"message"`
  88. URL string `json:"url"`
  89. }