repos

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(repoPath string) (*url.URL, error)

Parse parses a repository path and returns a URL.

Types

type FS added in v0.1.3

type FS = virt.FS

type File added in v0.1.3

type File = virt.File

func Download

func Download(ctx context.Context, repo Repo, path string) (*File, error)

Download a single file from the repository.

type Repo

type Repo interface {
	// Upload from a filesystem to the repository
	Upload(ctx context.Context, fromCh <-chan *File) error
	// Download paths from the repository to a filesystem
	Download(ctx context.Context, toCh chan<- *File, paths ...string) error
	// Walk the repository
	Walk(ctx context.Context, dir string, fn fs.WalkDirFunc) error
	// Close the repository
	Close() error
}

Repo is a repository interface for uploading and downloading files

type Tree added in v0.1.3

type Tree = virt.Tree

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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