Documentation ¶
Index ¶
- type Git
- func (g *Git) Checkout(name string) (err error)
- func (g *Git) CleanBranch() (err error)
- func (g *Git) Clone() (r *git.Repository, err error)
- func (g *Git) CloneOptions() (opt git.CloneOptions, err error)
- func (g *Git) CreateBranch() (branchShortName, branchName string, err error)
- func (g *Git) CreateBranchName() (name string, err error)
- func (g *Git) Fetch() (r *git.Repository, err error)
- func (g *Git) FetchOptions() (opt git.FetchOptions, err error)
- func (g *Git) GetAuth() (auth transport.AuthMethod, err error)
- func (g *Git) GetHash() (hash string, hashObj plumbing.Hash, r *git.Repository, ref *plumbing.Reference, ...)
- func (g *Git) IsHTTP() bool
- func (g *Git) IsNeedAuth() bool
- func (g *Git) LastCommitId() (hash string, err error)
- func (g *Git) Publish() (commitId string, err error)
- func (g *Git) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Git ¶
type Git struct { Url string `json:"url"` SshKey string `json:"ssh_key"` SshKeySalt string `json:"ssh_key_salt"` Path string `json:"path"` Branch string `json:"branch"` Username string `json:"username"` Password string `json:"password"` DirUser string `json:"dir_user"` }
func (*Git) CleanBranch ¶
func (*Git) CloneOptions ¶
func (*Git) CreateBranch ¶
创建分支
func (*Git) CreateBranchName ¶
func (*Git) FetchOptions ¶
func (*Git) GetHash ¶
func (g *Git) GetHash() (hash string, hashObj plumbing.Hash, r *git.Repository, ref *plumbing.Reference, err error)
获取 hash
func (*Git) IsNeedAuth ¶
func (*Git) LastCommitId ¶
Click to show internal directories.
Click to hide internal directories.