Documentation ¶
Index ¶
- Constants
- func Cat(objType string, objSHA string) string
- func Checkout(objSHA string, dir string)
- func Hash(filePath string, objType string, isStore bool) string
- func ListTree(objSHA string) string
- func Log(objSHA string) string
- func RevParse(objRev, revType string) string
- func ShowOrNewTag(tagName string, objSHA string, isCreateObject bool) string
- func ShowRefs(prefix string, withHash bool) string
- type BaseObject
- type Blob
- type Commit
- type KList
- type Leaf
- type Object
- type Repository
- type Tag
- type Tree
Constants ¶
View Source
const ( TypeBlob = "blob" TypeCommit = "commit" TypeTree = "tree" TypeTag = "tag" )
Variables ¶
This section is empty.
Functions ¶
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 ¶
type Commit ¶
type Commit struct { BaseObject // contains filtered or unexported fields }
func (*Commit) Deserialize ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(repoPath string) *Repository
Source Files ¶
Click to show internal directories.
Click to hide internal directories.