source

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source interface {
	Sync(
		ctx context.Context,
		destDir string,
		prevLock *lockfile.LockEntry,
		opts SyncOptions,
	) (*SyncResult, error)
	Close() error
}

Source defines a documentation source that can be synced.

func New

func New(name string, cfg config.Source, token string) (Source, error)

New creates a Source from config.

func NewGitHub

func NewGitHub(name string, cfg config.Source, token string) (Source, error)

func NewURL

func NewURL(name string, cfg config.Source) (Source, error)

type SyncOptions

type SyncOptions struct {
	Force  bool
	DryRun bool
}

SyncOptions controls behavior for source sync operations.

type SyncResult

type SyncResult struct {
	Downloaded int
	Deleted    int
	Skipped    bool
	LockEntry  *lockfile.LockEntry
}

SyncResult reports what happened during a sync.

Jump to

Keyboard shortcuts

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