Documentation
¶
Index ¶
- func Daemonize(wikiDir string) error
- func EnsureAutoPull(wikiDir string)
- func EnsureGitInit(wikiDir string) error
- func GetRemoteURL(wikiDir string) (string, error)
- func GetWikiStatus(wikiDir string) string
- func HasRemote(wikiDir string) bool
- func IsDaemonRunning(wikiDir string) bool
- func IsGitInitialized(wikiDir string) bool
- func Push(wikiDir string) error
- func ReadPID(wikiDir string) (int, error)
- func RemovePID(wikiDir string)
- func RestoreFile(wikiDir, filePath string) error
- func SetRemote(wikiDir, remoteURL string) error
- func StopDaemon(wikiDir string) error
- func WritePID(wikiDir string) error
- type CommitResult
- type DeletedFile
- type SyncResult
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureAutoPull ¶
func EnsureAutoPull(wikiDir string)
func EnsureGitInit ¶
func GetRemoteURL ¶
func GetWikiStatus ¶
func IsDaemonRunning ¶
func IsGitInitialized ¶
func RestoreFile ¶
func StopDaemon ¶
Types ¶
type CommitResult ¶
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)
Click to show internal directories.
Click to hide internal directories.