Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

repo_wiki.go 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. // WikiCommit page commit/revision
  5. type WikiCommit struct {
  6. ID string `json:"sha"`
  7. Author *CommitUser `json:"author"`
  8. Committer *CommitUser `json:"commiter"`
  9. Message string `json:"message"`
  10. }
  11. // WikiPage a wiki page
  12. type WikiPage struct {
  13. *WikiPageMetaData
  14. // Page content, base64 encoded
  15. ContentBase64 string `json:"content_base64"`
  16. CommitCount int64 `json:"commit_count"`
  17. Sidebar string `json:"sidebar"`
  18. Footer string `json:"footer"`
  19. }
  20. // WikiPageMetaData wiki page meta information
  21. type WikiPageMetaData struct {
  22. Title string `json:"title"`
  23. HTMLURL string `json:"html_url"`
  24. SubURL string `json:"sub_url"`
  25. LastCommit *WikiCommit `json:"last_commit"`
  26. }
  27. // CreateWikiPageOptions form for creating wiki
  28. type CreateWikiPageOptions struct {
  29. // page title. leave empty to keep unchanged
  30. Title string `json:"title"`
  31. // content must be base64 encoded
  32. ContentBase64 string `json:"content_base64"`
  33. // optional commit message summarizing the change
  34. Message string `json:"message"`
  35. }
  36. // WikiCommitList commit/revision list
  37. type WikiCommitList struct {
  38. WikiCommits []*WikiCommit `json:"commits"`
  39. Count int64 `json:"count"`
  40. }