archive

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SourceDirs map[conv.Provider]string
	ArchiveDir string
}

func (Config) SourceDirFor

func (c Config) SourceDirFor(provider conv.Provider) string

type ImportAnalysis

type ImportAnalysis struct {
	ArchiveDir       string
	FilesInspected   int
	Projects         int
	Conversations    int
	NewConversations int
	ToUpdate         int
	UpToDate         int
	QueuedFiles      []string
	StoreNeedsBuild  bool
	Err              error
}

func (ImportAnalysis) NeedsSync

func (a ImportAnalysis) NeedsSync() bool

func (ImportAnalysis) QueuedFileCount

func (a ImportAnalysis) QueuedFileCount() int

type ImportProgress

type ImportProgress struct {
	Provider          conv.Provider
	ProjectsCompleted int
	ProjectsTotal     int
	FilesInspected    int
	Conversations     int
	NewConversations  int
	ToUpdate          int
	CurrentProject    string
	Err               error
}

type Pipeline

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

func New

func New(cfg Config, store *canonical.Store, backends ...src.Backend) Pipeline

func (Pipeline) Analyze

func (p Pipeline) Analyze(ctx context.Context, onProgress func(ImportProgress)) (ImportAnalysis, error)

func (Pipeline) Run

func (p Pipeline) Run(ctx context.Context, onProgress func(SyncProgress)) (SyncResult, error)

type SyncActivity

type SyncActivity string
const (
	SyncActivitySyncingFiles    SyncActivity = "syncing_files"
	SyncActivityRebuildingStore SyncActivity = "rebuilding_store"
)

type SyncProgress

type SyncProgress struct {
	Provider conv.Provider
	Current  int
	Total    int
	File     string
	Copied   int
	Failed   int
	Activity SyncActivity
}

type SyncResult

type SyncResult struct {
	Copied     int
	Skipped    int
	Failed     int
	Elapsed    time.Duration
	StoreBuilt bool
	Drift      src.ProviderDriftReports
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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