Documentation ¶
Index ¶
- Constants
- func AddWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, ...) error
- func ChangeDefaultWikiBranch(ctx context.Context, repo *repo_model.Repository, newBranch string) error
- func DeleteWiki(ctx context.Context, repo *repo_model.Repository) error
- func DeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, ...) (err error)
- func EditWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, ...) error
- func InitWiki(ctx context.Context, repo *repo_model.Repository) error
- func ToWikiPageMetaData(wikiName WebPath, lastCommit *git.Commit, repo *repo_model.Repository) *api.WikiPageMetaData
- func WebPathSegments(s WebPath) []string
- func WebPathToGitPath(s WebPath) string
- func WebPathToURLPath(s WebPath) string
- func WebPathToUserTitle(s WebPath) (dir, display string)
- type WebPath
Constants ¶
View Source
const DefaultRemote = "origin"
Variables ¶
This section is empty.
Functions ¶
func AddWikiPage ¶
func AddWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, wikiName WebPath, content, message string) error
AddWikiPage adds a new wiki page with a given wikiPath.
func ChangeDefaultWikiBranch ¶
func ChangeDefaultWikiBranch(ctx context.Context, repo *repo_model.Repository, newBranch string) error
func DeleteWiki ¶
func DeleteWiki(ctx context.Context, repo *repo_model.Repository) error
DeleteWiki removes the actual and local copy of repository wiki.
func DeleteWikiPage ¶
func DeleteWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, wikiName WebPath) (err error)
DeleteWikiPage deletes a wiki page identified by its path.
func EditWikiPage ¶
func EditWikiPage(ctx context.Context, doer *user_model.User, repo *repo_model.Repository, oldWikiName, newWikiName WebPath, content, message string) error
EditWikiPage updates a wiki page identified by its wikiPath, optionally also changing wikiPath.
func InitWiki ¶
func InitWiki(ctx context.Context, repo *repo_model.Repository) error
InitWiki initializes a wiki for repository, it does nothing when repository already has wiki.
func ToWikiPageMetaData ¶
func ToWikiPageMetaData(wikiName WebPath, lastCommit *git.Commit, repo *repo_model.Repository) *api.WikiPageMetaData
ToWikiPageMetaData converts meta information to a WikiPageMetaData
func WebPathSegments ¶
func WebPathToGitPath ¶
func WebPathToURLPath ¶
func WebPathToUserTitle ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.