filesystem

package
v4.0.0-rc3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package filesystem is a storage backend base on filesystems

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigStorage

type ConfigStorage struct {
	// contains filtered or unexported fields
}

func (*ConfigStorage) DeleteRemote

func (c *ConfigStorage) DeleteRemote(name string) error

func (*ConfigStorage) Remote

func (c *ConfigStorage) Remote(name string) (*config.RemoteConfig, error)

func (*ConfigStorage) Remotes

func (c *ConfigStorage) Remotes() ([]*config.RemoteConfig, error)

func (*ConfigStorage) SetRemote

func (c *ConfigStorage) SetRemote(r *config.RemoteConfig) error

type ObjectStorage

type ObjectStorage struct {
	// contains filtered or unexported fields
}

ObjectStorage is an implementation of core.ObjectStorage that stores data on disk in the standard git format (this is, the .git directory).

Zero values of this type are not safe to use, see the New function below.

Currently only reads are supported, no writting.

Also values from this type are not yet able to track changes on disk, this is, Gitdir values will get outdated as soon as repositories change on disk.

func (*ObjectStorage) Begin

func (o *ObjectStorage) Begin() core.TxObjectStorage

Begin opens a new transaction. However, this implementation is not transactional, so Commit and Rollback have no effect.

func (*ObjectStorage) Commit

func (tx *ObjectStorage) Commit() error

func (*ObjectStorage) Get

Get returns the object with the given hash, by searching for it in the packfile and the git object directories.

func (*ObjectStorage) Iter

Iter returns an iterator for all the objects in the packfile with the given type.

func (*ObjectStorage) NewObject

func (s *ObjectStorage) NewObject() core.Object

func (*ObjectStorage) Rollback

func (tx *ObjectStorage) Rollback() error

func (*ObjectStorage) Set

func (s *ObjectStorage) Set(o core.Object) (core.Hash, error)

Set adds a new object to the storage.

func (*ObjectStorage) Writer

func (s *ObjectStorage) Writer() (io.WriteCloser, error)

Writer method not supported on Memory storage

type ReferenceStorage

type ReferenceStorage struct {
	// contains filtered or unexported fields
}

func (*ReferenceStorage) Get

func (*ReferenceStorage) Iter

func (*ReferenceStorage) Set

func (r *ReferenceStorage) Set(ref *core.Reference) error

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(fs fs.Filesystem) (*Storage, error)

func (*Storage) ConfigStorage

func (s *Storage) ConfigStorage() config.ConfigStorage

func (*Storage) ObjectStorage

func (s *Storage) ObjectStorage() core.ObjectStorage

func (*Storage) ReferenceStorage

func (s *Storage) ReferenceStorage() core.ReferenceStorage

Directories

Path Synopsis
internal
dotgit
https://github.com/git/git/blob/master/Documentation/gitrepository-layout.txt
https://github.com/git/git/blob/master/Documentation/gitrepository-layout.txt

Jump to

Keyboard shortcuts

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