Documentation
¶
Index ¶
- 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 ClearWikiIndex(ctx context.Context, repoID int64) 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 GetDeadLinks(ctx context.Context, repoID int64) ([]map[string]string, error)
- func GetOrphanedPages(ctx context.Context, repoID int64) ([]*repo_model.WikiIndex, error)
- func GetWikiGraph(ctx context.Context, repoID int64) (nodes []map[string]any, edges []map[string]any, err error)
- func GetWikiIncomingLinks(ctx context.Context, repoID int64, pageName string) ([]string, error)
- func IndexAllWikiPages(ctx context.Context, repo *repo_model.Repository) error
- func IndexWikiPage(ctx context.Context, repo *repo_model.Repository, pageName string) error
- func InitWiki(ctx context.Context, repo *repo_model.Repository) error
- func RemoveWikiPageFromIndex(ctx context.Context, repoID int64, pageName string) 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 ¶
This section is empty.
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 ClearWikiIndex ¶
ClearWikiIndex removes all indexed pages for a repository
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 GetDeadLinks ¶
GetDeadLinks returns links to non-existent pages
func GetOrphanedPages ¶
GetOrphanedPages returns pages with no incoming links
func GetWikiGraph ¶
func GetWikiGraph(ctx context.Context, repoID int64) ( nodes []map[string]any, edges []map[string]any, err error, )
GetWikiGraph returns the link graph for a wiki
func GetWikiIncomingLinks ¶
GetWikiIncomingLinks returns pages that link to the given page
func IndexAllWikiPages ¶
func IndexAllWikiPages(ctx context.Context, repo *repo_model.Repository) error
IndexAllWikiPages indexes all pages in a wiki
func IndexWikiPage ¶
func IndexWikiPage(ctx context.Context, repo *repo_model.Repository, pageName string) error
IndexWikiPage indexes a single wiki page for search
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 RemoveWikiPageFromIndex ¶
RemoveWikiPageFromIndex removes a page from the search index
func ToWikiPageMetaData ¶
func ToWikiPageMetaData(wikiName WebPath, lastCommit *git.Commit, repo *repo_model.Repository) *api.WikiPageMetaData
ToWikiPageMetaData converts meta information to a WikiPageMetaData
Types ¶
Source Files
¶
- wiki.go
- wiki_index.go
- wiki_path.go