vcsstore

package module
v0.0.0-...-a6d3b49 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2015 License: BSD-3-Clause Imports: 11 Imported by: 0

README

vcsstore

vcsstore stores VCS repositories and makes them accessible via HTTP.

Build Status

Install

  • Install libssh2 and libssl-dev: apt-get install libssh2-1-dev libssl-dev
  • Run go get -d -u sourcegraph.com/sourcegraph/vcsstore and cd into the folder
  • Run make build-libgit2
  • godep go install ./cmd/vcsstore
  • vcsstore serve

The included Dockerfile exposes vcsstore on container port 80. To expose it on host port 9090 and have it store VCS data in /tmp/vcsstore on the host, run:

docker build -t vcsstore .
docker run -e GOMAXPROCS=8 -p 9090:80 -v /tmp/vcsstore vcsstore

vcsstore (and vcsclient in particular) can also be used as a library.

Authors

Documentation

Overview

Package vcsstore is the base package for vcsstore, a system that stores VCS repositories and makes them accessible via HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeRepositoryPath

func DecodeRepositoryPath(path string) (repoPath string)

func EncodeRepositoryPath

func EncodeRepositoryPath(repoPath string) (path string)

Types

type Config

type Config struct {
	// StorageDir is where cloned repositories are stored. If empty, the current
	// working directory is used.
	StorageDir string

	Log *log.Logger

	DebugLog *log.Logger
}

func (*Config) CloneDir

func (c *Config) CloneDir(repoPath string) (string, error)

CloneDir validates vcsType and cloneURL. If they are valid, cloneDir returns the local directory that the repository should be cloned to (which it may already exist at). If invalid, cloneDir returns a non-nil error.

type Service

type Service interface {
	// Open opens a repository. If it doesn't exist. an
	// os.ErrNotExist-satisfying error is returned. If opening succeeds, the
	// repository is returned.
	Open(repoPath string) (interface{}, error)

	// Close closes the repository.
	Close(repoPath string)

	// Clone clones the repository if a clone doesn't yet exist locally.
	// Otherwise, it opens the repository. If no errors occur, the repository is
	// returned.
	Clone(repoPath string, cloneInfo *vcsclient.CloneInfo) (interface{}, error)
}

func NewService

func NewService(c *Config) Service

Directories

Path Synopsis
Godeps
_workspace/src/code.google.com/p/rog-go/parallel
The parallel package provides a way of running functions concurrently while limiting the maximum number running at once.
The parallel package provides a way of running functions concurrently while limiting the maximum number running at once.
_workspace/src/github.com/beyang/hgo
Package hgo provides read access to Mercurial repositories.
Package hgo provides read access to Mercurial repositories.
_workspace/src/github.com/beyang/hgo/changelog
Package changelog provides read access to the changelog.
Package changelog provides read access to the changelog.
_workspace/src/github.com/beyang/hgo/cmd/hgo
An example program that aims to imitate a subset of Mercurial's sub-commands.
An example program that aims to imitate a subset of Mercurial's sub-commands.
_workspace/src/github.com/beyang/hgo/revlog
Package revlog provides read access to RevlogNG files.
Package revlog provides read access to RevlogNG files.
_workspace/src/github.com/beyang/hgo/revlog/patch
The patch package provides support for calculating and applying revlog patches
The patch package provides support for calculating and applying revlog patches
_workspace/src/github.com/beyang/hgo/store
Package store provides access to Mercurial's ‘store’ repository format.
Package store provides access to Mercurial's ‘store’ repository format.
_workspace/src/github.com/coreos/etcd/metrics
Package metrics provides both a means of generating metrics and the ability to send metric data to a graphite endpoint.
Package metrics provides both a means of generating metrics and the ability to send metric data to a graphite endpoint.
_workspace/src/github.com/coreos/etcd/mod
mod is the entry point to all of the etcd modules.
mod is the entry point to all of the etcd modules.
Extensions to the standard "os" package.
_workspace/src/github.com/coreos/etcd/third_party/code.google.com/p/gogoprotobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
_workspace/src/github.com/coreos/etcd/third_party/github.com/coreos/go-systemd/journal
Package journal provides write bindings to the systemd journal
Package journal provides write bindings to the systemd journal
_workspace/src/github.com/coreos/etcd/third_party/github.com/goraft/raft/protobuf
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.
_workspace/src/github.com/coreos/etcd/third_party/github.com/gorilla/context
Package gorilla/context stores values shared during a request lifetime.
Package gorilla/context stores values shared during a request lifetime.
_workspace/src/github.com/coreos/etcd/third_party/github.com/gorilla/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/github.com/coreos/etcd/third_party/github.com/mreiferson/go-httpclient
Provides an HTTP Transport that implements the `RoundTripper` interface and can be used as a built in replacement for the standard library's, providing:
Provides an HTTP Transport that implements the `RoundTripper` interface and can be used as a built in replacement for the standard library's, providing:
Go port of Coda Hale's Metrics library
Metrics output to StatHat.
_workspace/src/github.com/gogo/protobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
_workspace/src/github.com/gogo/protobuf/proto/proto3_proto
Package proto3_proto is a generated protocol buffer package.
Package proto3_proto is a generated protocol buffer package.
_workspace/src/github.com/golang/protobuf/proto
Package proto converts data structures to and from the wire format of protocol buffers.
Package proto converts data structures to and from the wire format of protocol buffers.
_workspace/src/github.com/google/go-querystring/query
Package query implements encoding of structs into URL query parameters.
Package query implements encoding of structs into URL query parameters.
_workspace/src/github.com/gorilla/context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
_workspace/src/github.com/gorilla/handlers
Package handlers is a collection of handlers for use with Go's net/http package.
Package handlers is a collection of handlers for use with Go's net/http package.
_workspace/src/github.com/gorilla/schema
Package gorilla/schema fills a struct with form values.
Package gorilla/schema fills a struct with form values.
_workspace/src/github.com/kr/pretty
Package pretty provides pretty-printing for Go values.
Package pretty provides pretty-printing for Go values.
_workspace/src/github.com/kr/text
Package text provides rudimentary functions for manipulating text in paragraphs.
Package text provides rudimentary functions for manipulating text in paragraphs.
_workspace/src/github.com/kr/text/colwriter
Package colwriter provides a write filter that formats input lines in multiple columns.
Package colwriter provides a write filter that formats input lines in multiple columns.
_workspace/src/github.com/kr/text/mc
Command mc prints in multiple columns.
Command mc prints in multiple columns.
_workspace/src/github.com/sourcegraph/mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
_workspace/src/golang.org/x/crypto/ssh
Package ssh implements an SSH client and server.
Package ssh implements an SSH client and server.
_workspace/src/golang.org/x/crypto/ssh/agent
Package agent implements a client to an ssh-agent daemon.
Package agent implements a client to an ssh-agent daemon.
_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
_workspace/src/golang.org/x/crypto/ssh/test
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
_workspace/src/golang.org/x/tools/godoc/vfs
Package vfs defines types for abstract file system access and provides an implementation accessing the file system of the underlying OS.
Package vfs defines types for abstract file system access and provides an implementation accessing the file system of the underlying OS.
_workspace/src/golang.org/x/tools/godoc/vfs/gatefs
Package gatefs provides an implementation of the FileSystem interface that wraps another FileSystem and limits its concurrency.
Package gatefs provides an implementation of the FileSystem interface that wraps another FileSystem and limits its concurrency.
_workspace/src/golang.org/x/tools/godoc/vfs/httpfs
Package httpfs implements http.FileSystem using a godoc vfs.FileSystem.
Package httpfs implements http.FileSystem using a godoc vfs.FileSystem.
_workspace/src/golang.org/x/tools/godoc/vfs/mapfs
Package mapfs file provides an implementation of the FileSystem interface based on the contents of a map[string]string.
Package mapfs file provides an implementation of the FileSystem interface based on the contents of a map[string]string.
_workspace/src/golang.org/x/tools/godoc/vfs/zipfs
Package zipfs file provides an implementation of the FileSystem interface based on the contents of a .zip file.
Package zipfs file provides an implementation of the FileSystem interface based on the contents of a .zip file.
_workspace/src/gopkgs.com/vfs.v1
Package vfs implements Virtual File Systems with read-write support.
Package vfs implements Virtual File Systems with read-write support.
_workspace/src/gopkgs.com/vfs.v1/buildfs
Package buildfs allows plugging a VFS into a go/build.Context.
Package buildfs allows plugging a VFS into a go/build.Context.
_workspace/src/sourcegraph.com/sourcegraph/go-diff/diff
Package diff provides a parser for unified diffs.
Package diff provides a parser for unified diffs.
_workspace/src/sourcegraph.com/sourcegraph/go-vcs/vcs
Package vcs provides an interface for reading and manipulating repositories in version control systems.
Package vcs provides an interface for reading and manipulating repositories in version control systems.
_workspace/src/sourcegraph.com/sqs/pbtypes
Package pbtypes contains protocol buffer types (Timestamp, Void, etc.) and related helpers.
Package pbtypes contains protocol buffer types (Timestamp, Void, etc.) and related helpers.
cmd
Package vcsclient is a generated protocol buffer package.
Package vcsclient is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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