git

package
v0.0.0-...-53d016b Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Auth transport.AuthMethod
}

func C

func C() *Client

func (*Client) AllBranches

func (t *Client) AllBranches(path string) ([]string, []string, error)

get all branches (short) e.g: fix/checkout-empty-repo master return(shortBranches, branchCommit, error)

func (*Client) AllTags

func (t *Client) AllTags(path string) ([]string, []string, error)

get all tags e.g: v1.0.0 v2.0.0 v2.1.0 v2.1.1 v2.1.2 v2.1.3 return (tags, tagsCommits, err)

func (*Client) BasicAuth

func (t *Client) BasicAuth(username, password string) *Client

Token Auth

func (*Client) CheckoutBranch

func (t *Client) CheckoutBranch(path, branch string) error

checkout branch

func (*Client) CheckoutTag

func (t *Client) CheckoutTag(path, tag string) error

checkout tag

func (*Client) Clone

func (t *Client) Clone(url, path string) error

clone repository

func (*Client) FetchAll

func (t *Client) FetchAll(path string) error

fetch all branches

func (*Client) LsRemoteBranches

func (t *Client) LsRemoteBranches(path string) ([]string, []string, error)

List all remote branches e.g: refs/remotes/origin/fix/checkout-empty-repo refs/remotes/origin/master return(branches, branchCommit, error)

func (*Client) Pull

func (t *Client) Pull(path, branch string) error

pull branch

func (*Client) TokenAuth

func (t *Client) TokenAuth(token string) *Client

Token Auth

Jump to

Keyboard shortcuts

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