repo

package
v0.0.0-...-639e356 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeBlob   = "blob"
	TypeCommit = "commit"
	TypeTree   = "tree"
	TypeTag    = "tag"
)

Variables

This section is empty.

Functions

func Cat

func Cat(objType string, objSHA string) string

func Checkout

func Checkout(objSHA string, dir string)

func Hash

func Hash(filePath string, objType string, isStore bool) string

func ListTree

func ListTree(objSHA string) string

func Log

func Log(objSHA string) string

func RevParse

func RevParse(objRev, revType string) string

func ShowOrNewTag

func ShowOrNewTag(tagName string, objSHA string, isCreateObject bool) string

func ShowRefs

func ShowRefs(prefix string, withHash bool) string

Types

type BaseObject

type BaseObject struct {
	Object
	// contains filtered or unexported fields
}

func (*BaseObject) Encode

func (bo *BaseObject) Encode() ([]byte, error)

func (*BaseObject) GetFormat

func (bo *BaseObject) GetFormat() string

func (*BaseObject) Read

func (bo *BaseObject) Read(objSHA string) error

func (*BaseObject) Save

func (bo *BaseObject) Save() (string, error)

type Blob

type Blob struct {
	BaseObject
	// contains filtered or unexported fields
}

func (*Blob) Deserialize

func (b *Blob) Deserialize(data []byte) error

func (*Blob) Serialize

func (b *Blob) Serialize() (string, error)

type Commit

type Commit struct {
	BaseObject
	// contains filtered or unexported fields
}

func (*Commit) Deserialize

func (c *Commit) Deserialize(data []byte) error

func (*Commit) Serialize

func (c *Commit) Serialize() (string, error)

type KList

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

type Leaf

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

type Object

type Object interface {
	Read(objSHA string) error
	Save() (string, error)
	Encode() ([]byte, error)
	Serialize() (string, error)
	Deserialize(data []byte) error
	GetFormat() string
}

type Repository

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

func Init

func Init(repoPath string) *Repository

type Tag

type Tag struct {
	*Commit
}

type Tree

type Tree struct {
	BaseObject
	// contains filtered or unexported fields
}

func (*Tree) Deserialize

func (t *Tree) Deserialize(data []byte) error

func (*Tree) Display

func (t *Tree) Display() (string, error)

func (*Tree) Serialize

func (t *Tree) Serialize() (string, error)

Jump to

Keyboard shortcuts

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