Documentation
¶
Overview ¶
Package git provides the models of Git such as a repository and branch.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchName ¶
type BranchName string
BranchName represents name of a branch.
func (BranchName) QualifiedName ¶
func (b BranchName) QualifiedName() RefQualifiedName
QualifiedName returns RefQualifiedName. If the BranchName is empty, it returns a zero value.
type CommitAuthor ¶
CommitAuthor represents an author of commit.
type File ¶
type File struct { Filename string // filename (including path separators) BlobSHA BlobSHA // blob SHA Executable bool // if the file is executable Deleted bool // if the file is deleted }
File represents a file in a tree.
type NewBlob ¶
type NewBlob struct { Repository RepositoryID Content string // base64 encoded content }
NewBlob represents a blob.
type NewBranch ¶
type NewBranch struct { Repository RepositoryID BranchName BranchName CommitSHA CommitSHA }
NewBranch represents a branch.
type NewCommit ¶
type NewCommit struct { Repository RepositoryID Message CommitMessage Author *CommitAuthor // optional Committer *CommitAuthor // optional ParentCommitSHA CommitSHA // optional TreeSHA TreeSHA }
NewCommit represents a commit.
type NewTree ¶
type NewTree struct { Repository RepositoryID BaseTreeSHA TreeSHA Files []File }
NewTree represents a tree.
type RefName ¶
type RefName string
RefName represents name of a ref, that is a branch or a tag. This may be simple name or qualified name.
type RefQualifiedName ¶
RefQualifiedName represents qualified name of a ref, e.g. refs/heads/master.
func (RefQualifiedName) IsValid ¶
func (r RefQualifiedName) IsValid() bool
func (RefQualifiedName) String ¶
func (r RefQualifiedName) String() string
type Release ¶
type Release struct { ID ReleaseID TagName TagName TargetCommitish string // branch name or commit SHA Name string }
Release represents a release associated to a tag.
type ReleaseAsset ¶
ReleaseAsset represents a release asset.
type ReleaseID ¶
type ReleaseID struct { Repository RepositoryID InternalID int64 // GitHub API will allocate this ID }
ReleaseID represents an ID of release.
type RepositoryID ¶
RepositoryID represents a pointer to a repository.
func (RepositoryID) IsValid ¶
func (id RepositoryID) IsValid() bool
IsValid returns true if owner and name is not empty.
func (RepositoryID) String ¶
func (id RepositoryID) String() string
type TagName ¶
type TagName string
TagName represents name of a tag.
func (TagName) QualifiedName ¶
func (t TagName) QualifiedName() RefQualifiedName
QualifiedName returns RefQualifiedName. If the TagName is empty, it returns a zero value.