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