vaultsync

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package vaultsync mirrors Markdown vaults to WebDAV and S3 remotes using timestamp + size rules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SyncMarkdownVault

func SyncMarkdownVault(ctx context.Context, localRoot string, cfg WebDAVConfig) error

SyncMarkdownVault performs a bidirectional sync of all .md files under localRoot. When local and remote both differ in modification time and size, the local file is copied to stem.conflict.ext and the remote content replaces the local file.

func SyncMarkdownVaultS3 added in v1.3.2

func SyncMarkdownVaultS3(ctx context.Context, localRoot string, cfg S3Config) error

SyncMarkdownVaultS3 mirrors .md files under localRoot with objects under cfg.Prefix in the bucket.

Types

type S3Config added in v1.3.2

type S3Config struct {
	Region    string
	Bucket    string
	Prefix    string
	AccessKey string
	SecretKey string
	// Endpoint is optional (e.g. https://play.min.io for MinIO); empty uses AWS default for the region.
	Endpoint string
}

S3Config targets a bucket prefix for bidirectional Markdown sync (compatible with AWS S3 and MinIO-style endpoints).

type WebDAVConfig

type WebDAVConfig struct {
	URL      string
	User     string
	Password string
	// RemoteRoot is a path segment under the WebDAV base (no leading slash), e.g. "notes/vault".
	RemoteRoot string
}

WebDAVConfig is the remote endpoint and optional path prefix under the WebDAV root URL.

Jump to

Keyboard shortcuts

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