gitsync

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncResult

type SyncResult struct {
	FilesChanged int
	CommitHash   string
	Pushed       bool
	Message      string
}

SyncResult holds the result of a sync operation.

type Syncer

type Syncer struct {
	VaultPath string
	Remote    string
	AuthToken string
}

Syncer handles git synchronization for the vault.

func NewSyncer

func NewSyncer(vaultPath, remote string) *Syncer

NewSyncer creates a new Syncer.

func (*Syncer) Pull

func (s *Syncer) Pull() error

Pull fetches and merges remote changes.

func (*Syncer) Status

func (s *Syncer) Status() ([]string, error)

Status returns a list of changed file paths.

func (*Syncer) Sync

func (s *Syncer) Sync() (*SyncResult, error)

Sync commits local changes and optionally pushes them to the remote.

Jump to

Keyboard shortcuts

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