wiki

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureAutoPull

func EnsureAutoPull(wikiDir string)

func EnsureGitInit

func EnsureGitInit(wikiDir string) error

func GetRemoteURL

func GetRemoteURL(wikiDir string) (string, error)

func GetWikiStatus

func GetWikiStatus(wikiDir string) string

func HasRemote

func HasRemote(wikiDir string) bool

func IsGitInitialized

func IsGitInitialized(wikiDir string) bool

func Push

func Push(wikiDir string) error

func RestoreFile

func RestoreFile(wikiDir, filePath string) error

func SetRemote

func SetRemote(wikiDir, remoteURL string) error

Types

type CommitResult

type CommitResult struct {
	HasChanges bool
	CommitHash string
	Message    string
}

func StageAndCommit

func StageAndCommit(wikiDir, message string) (*CommitResult, error)

type DeletedFile

type DeletedFile struct {
	Path    string `json:"path"`
	Commit  string `json:"commit"`
	Date    string `json:"date"`
	Message string `json:"message"`
}

func ListDeletedFiles

func ListDeletedFiles(wikiDir string, limit int) ([]DeletedFile, error)

type SyncResult

type SyncResult struct {
	PullOK  bool
	PushOK  bool
	Commit  *CommitResult
	PullErr string
	PushErr string
}

func Sync

func Sync(wikiDir string) (*SyncResult, error)

Jump to

Keyboard shortcuts

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