Documentation
¶
Index ¶
- 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 IsGitInitialized(wikiDir string) bool
- func Push(wikiDir string) error
- func RestoreFile(wikiDir, filePath string) error
- func SetRemote(wikiDir, remoteURL string) error
- type CommitResult
- type DeletedFile
- type SyncResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureAutoPull ¶
func EnsureAutoPull(wikiDir string)
func EnsureGitInit ¶
func GetRemoteURL ¶
func GetWikiStatus ¶
func IsGitInitialized ¶
func RestoreFile ¶
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.