wiki

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Daemonize

func Daemonize(wikiDir string) error

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 IsDaemonRunning

func IsDaemonRunning(wikiDir string) bool

func IsGitInitialized

func IsGitInitialized(wikiDir string) bool

func Push

func Push(wikiDir string) error

func ReadPID

func ReadPID(wikiDir string) (int, error)

func RemovePID

func RemovePID(wikiDir string)

func RestoreFile

func RestoreFile(wikiDir, filePath string) error

func SetRemote

func SetRemote(wikiDir, remoteURL string) error

func StopDaemon

func StopDaemon(wikiDir string) error

func WritePID

func WritePID(wikiDir 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)

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(wikiDir string, autoPush bool) (*Watcher, error)

func (*Watcher) Run

func (w *Watcher) Run()

func (*Watcher) Stop

func (w *Watcher) Stop()

Jump to

Keyboard shortcuts

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