git

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound should be returned by Backend.ReadBlob if a blob was not found.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	ReadBlob(name string) (io.ReadCloser, error)
	WriteBlob(name string, r io.Reader) error
}

A Backend for a crypto repo

type Repo

type Repo interface {
	// GetRevisions should return all revisions in chronological order
	GetRevisions() ([]Revision, error)

	SaveNewRevision(rev Revision, packfile io.Reader) error

	ReadPackfile(toRev int) (io.ReadCloser, error)
}

A Repo for git data

func NewJSONRepo

func NewJSONRepo(backend Backend) Repo

NewJSONRepo returns a Repo implementation that stores revisions as json

type Revision

type Revision map[string]string

A Revision is a version of the server's state

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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