wiki

package
v1.24.0-dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 22 Imported by: 4

Documentation

Index

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 added in v1.22.0

func ChangeDefaultWikiBranch(ctx context.Context, repo *repo_model.Repository, newBranch string) error

func DeleteWiki added in v1.16.0

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 added in v1.21.5

func ToWikiPageMetaData(wikiName WebPath, lastCommit *git.Commit, repo *repo_model.Repository) *api.WikiPageMetaData

ToWikiPageMetaData converts meta information to a WikiPageMetaData

func WebPathSegments added in v1.20.0

func WebPathSegments(s WebPath) []string

func WebPathToGitPath added in v1.20.0

func WebPathToGitPath(s WebPath) string

func WebPathToURLPath added in v1.20.0

func WebPathToURLPath(s WebPath) string

func WebPathToUserTitle added in v1.20.0

func WebPathToUserTitle(s WebPath) (dir, display string)

Types

type WebPath added in v1.20.0

type WebPath string

func GitPathToWebPath added in v1.20.0

func GitPathToWebPath(s string) (wp WebPath, err error)

func UserTitleToWebPath added in v1.20.0

func UserTitleToWebPath(base, title string) WebPath

func WebPathFromRequest added in v1.20.0

func WebPathFromRequest(s string) WebPath

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL