storage

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2016 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package storage allows access to git directories stored in a (usually registry-specific) storage directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PeelTree

func PeelTree(repo *git.Repository, id *git.Oid) (*git.Tree, error)

PeelTree recursively traverses the passed in Git object until a Git tree object is found.

Types

type Download

type Download struct {
	Repo *git.Repository
	Tree *git.Tree
}

Download represents an ongoing download.

func NewDownload

func NewDownload(repo *git.Repository, id *git.Oid) (*Download, error)

NewDownload creates a new download.

func (*Download) Start

func (d *Download) Start(w io.Writer) error

Start recursively traverses the internal Git object tree and dynamically creates and compresses the corresponding tarball.

type Storage

type Storage struct {
	Dir string
}

Storage manages a directory of Git repositories.

func New

func New(dir string) *Storage

New creates a new storage bound to the specified directory.

func (*Storage) GetRepo

func (s *Storage) GetRepo(name string) (*git.Repository, error)

GetRepo opens the repository in the sub-directory "name".

func (*Storage) Ls

func (s *Storage) Ls() ([]string, error)

Ls lists all available repository names.

Jump to

Keyboard shortcuts

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