Versions in this module Expand all Collapse all v0 v0.6.1 Mar 26, 2015 v0.6.0 Mar 19, 2015 v0.5.13 Feb 13, 2015 v0.5.11 Jan 5, 2015 v0.5.9 Dec 14, 2014 v0.5.8 Nov 19, 2014 v0.5.5 Oct 10, 2014 Changes in this version + var ErrNotValidHook = errors.New("not a valid Git hook") + func IsValidHookName(name string) bool type Commit + func (c *Commit) GetSubModule(entryname string) (*SubModule, error) + func (c *Commit) GetSubModules() (map[string]*SubModule, error) + type Hook struct + Content string + IsActive bool + Sample string + func GetHook(repoPath, name string) (*Hook, error) + func ListHooks(repoPath string) (_ []*Hook, err error) + func (h *Hook) Name() string + func (h *Hook) Update() error type Repository + func (repo *Repository) GetHook(name string) (*Hook, error) + func (repo *Repository) Hooks() ([]*Hook, error) + type SubModule struct + Name string + Url string + type SubModuleFile struct + func NewSubModuleFile(c *Commit, refUrl, refId string) *SubModuleFile + func (sf *SubModuleFile) RefId() string + func (sf *SubModuleFile) RefUrl() string type TreeEntry + func (te *TreeEntry) IsSubModule() bool type Version + func (v *Version) AtLeast(that *Version) bool v0.5.2 Sep 18, 2014 Changes in this version type Version + func MustParseVersion(verStr string) *Version + func ParseVersion(verStr string) (*Version, error) + func (v *Version) Compare(that *Version) int + func (v *Version) LessThan(that *Version) bool v0.5.0 Sep 14, 2014 Changes in this version + var ErrNotExist = errors.New("error not exist") + var IdNotExist = errors.New("sha1 id not exist") + func IsBranchExist(repoPath, branchName string) bool + func IsTagExist(repoPath, tagName string) bool + func NewId(b []byte) (sha1, error) + func NewIdFromString(s string) (sha1, error) + func RefEndName(refStr string) string + type ArchiveType int + const TARGZ + const ZIP + type Blob struct + func (b *Blob) Data() (io.Reader, error) + type Commit struct + Author *Signature + CommitMessage string + Committer *Signature + Id sha1 + func (c *Commit) CommitsBefore() (*list.List, error) + func (c *Commit) CommitsBeforeUntil(commitId string) (*list.List, error) + func (c *Commit) CommitsByRange(page int) (*list.List, error) + func (c *Commit) CommitsCount() (int, error) + func (c *Commit) CreateArchive(path string, archiveType ArchiveType) error + func (c *Commit) GetCommitOfRelPath(relPath string) (*Commit, error) + func (c *Commit) Message() string + func (c *Commit) Parent(n int) (*Commit, error) + func (c *Commit) ParentCount() int + func (c *Commit) ParentId(n int) (id sha1, err error) + func (c *Commit) SearchCommits(keyword string) (*list.List, error) + func (c *Commit) Summary() string + type Entries []*TreeEntry + func (bs Entries) Len() int + func (bs Entries) Less(i, j int) bool + func (bs Entries) Sort() + func (bs Entries) Swap(i, j int) + type EntryMode int + const ModeBlob + const ModeCommit + const ModeExec + const ModeSymlink + const ModeTree + type ObjectType string + const BLOB + const COMMIT + const TAG + const TREE + type Repository struct + Path string + func OpenRepository(repoPath string) (*Repository, error) + func (repo *Repository) CommitsBetween(last *Commit, before *Commit) (*list.List, error) + func (repo *Repository) CommitsByFileAndRange(branch, file string, page int) (*list.List, error) + func (repo *Repository) CommitsCount(commitId string) (int, error) + func (repo *Repository) CreateTag(tagName, idStr string) error + func (repo *Repository) FileCommitsCount(branch, file string) (int, error) + func (repo *Repository) GetBranches() ([]string, error) + func (repo *Repository) GetCommit(commitId string) (*Commit, error) + func (repo *Repository) GetCommitIdOfBranch(branchName string) (string, error) + func (repo *Repository) GetCommitIdOfTag(tagName string) (string, error) + func (repo *Repository) GetCommitOfBranch(branchName string) (*Commit, error) + func (repo *Repository) GetCommitOfTag(tagName string) (*Commit, error) + func (repo *Repository) GetTag(tagName string) (*Tag, error) + func (repo *Repository) GetTags() ([]string, error) + func (repo *Repository) GetTree(idStr string) (*Tree, error) + func (repo *Repository) IsBranchExist(branchName string) bool + func (repo *Repository) IsTagExist(tagName string) bool + type Signature struct + Email string + Name string + When time.Time + type Tag struct + Id sha1 + Name string + Object sha1 + TagMessage string + Tagger *Signature + Type string + func (tag *Tag) Commit() (*Commit, error) + type Tree struct + Id sha1 + func NewTree(repo *Repository, id sha1) *Tree + func (t *Tree) GetBlobByPath(rpath string) (*Blob, error) + func (t *Tree) GetTreeEntryByPath(relpath string) (*TreeEntry, error) + func (t *Tree) ListEntries(relpath string) (Entries, error) + func (t *Tree) SubTree(rpath string) (*Tree, error) + type TreeEntry struct + Id sha1 + Type ObjectType + func (te *TreeEntry) Blob() *Blob + func (te *TreeEntry) EntryMode() EntryMode + func (te *TreeEntry) IsDir() bool + func (te *TreeEntry) Name() string + func (te *TreeEntry) Size() int64 + type Version struct + Major int + Minor int + Patch int + func GetVersion() (Version, error)