core

package
v0.0.0-...-41cac4f Latest Latest
Warning

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

Go to latest
Published: May 26, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const DirectoryMode = "040000"
View Source
const FileModeNoPerm = "100000" // Permissions still need to be ORred in

Variables

This section is empty.

Functions

func GetCommitObject

func GetCommitObject(hash string) (*commitObject, error)

Return commit object based on hash

func GetCommitObjectFromString

func GetCommitObjectFromString(s string) (*commitObject, error)

Get commit object from string contents

func GetPrefixObject

func GetPrefixObject(hash string) (*prefixObject, error)

Get prefix object based on hash

func GetPrefixObjectFromString

func GetPrefixObjectFromString(s string) (*prefixObject, error)

Get prefix object from string contents

func GetSnapshotObject

func GetSnapshotObject(hash string) (*snapshotObject, error)

Return snapshot object based on hash

func GetSnapshotObjectFromString

func GetSnapshotObjectFromString(s string) (*snapshotObject, error)

Return snapshot object from string contents

func GetTreeObject

func GetTreeObject(hash string) (*treeObject, error)

Return tree object based on hash

func GetTreeObjectFromString

func GetTreeObjectFromString(s string) (*treeObject, error)

Return tree object from string contents

func Prefix

func Prefix() string

func SnapshotCheckout

func SnapshotCheckout(path, hash string, fWrite func(hash, filename string, perm os.FileMode)) error

func SnapshotList

func SnapshotList(hash string, fFile func(entry SnapshotEntry, base string), fEnteringDir func(base string), fLeavingDir func(base string, entries []SnapshotEntry)) error

func SnapshotStatus

func SnapshotStatus(path, hash string) error

func StoreCommitObject

func StoreCommitObject(message, branch, snapshot string, warmParents, coldParents []string, added <-chan []byte, removed []string) (hash string, empty bool, err error)

func StorePrefixObject

func StorePrefixObject(commitHash string) error

func StoreSnapshotObject

func StoreSnapshotObject(path string, addFn func(filename string) (string, error)) (hash string, err error)

Types

type SnapshotEntry

type SnapshotEntry struct {
	Mode string `json:"mode"` // *nix filemode
	Name string `json:"name"` // filename
	Blob string `json:"blob"` // pointer to blob
}

func (*SnapshotEntry) IsDirectory

func (sse *SnapshotEntry) IsDirectory() bool

Jump to

Keyboard shortcuts

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