wiki

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRemote = "origin"
	DefaultBranch = "master"
)

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 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 WebPathSegments

func WebPathSegments(s WebPath) []string

func WebPathToGitPath

func WebPathToGitPath(s WebPath) string

func WebPathToURLPath

func WebPathToURLPath(s WebPath) string

func WebPathToUserTitle

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

Types

type WebPath

type WebPath string

func GitPathToWebPath

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

func UserTitleToWebPath

func UserTitleToWebPath(base, title string) WebPath

func WebPathFromRequest

func WebPathFromRequest(s string) WebPath

Jump to

Keyboard shortcuts

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