gtc

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMethod added in v0.21.0

type AuthMethod struct {
	AuthMethod transport.AuthMethod
	// contains filtered or unexported fields
}

func GetAuth added in v0.11.0

func GetAuth(username, password, sshKeyPath string) (AuthMethod, error)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Clone

func Clone(opt ClientOpt) (Client, error)

func Init

func Init(opt ClientOpt) (Client, error)

func Open

func Open(opt ClientOpt) (Client, error)

func (*Client) Add

func (c *Client) Add(filePath string) error

func (*Client) AddClientAsSubmodule added in v0.9.0

func (c *Client) AddClientAsSubmodule(name string, subc Client) error

func (*Client) Checkout

func (c *Client) Checkout(name string, force bool) error

Checkout is the function switchng another refs. When force is true, create and switch new branch if named branch is not defined.

func (*Client) Clean added in v0.2.0

func (c *Client) Clean() error

func (*Client) Commit

func (c *Client) Commit(message string) error

func (*Client) CommitFiles

func (c *Client) CommitFiles(files map[string][]byte, message string) error

func (*Client) CreateBranch added in v0.12.0

func (c *Client) CreateBranch(dst string, recreate bool) error

func (*Client) Fetch added in v0.4.0

func (c *Client) Fetch() error

func (*Client) GetHash added in v0.5.0

func (c *Client) GetHash(base string, referRemote bool) (string, error)

func (*Client) GetLatestTagReference added in v0.6.0

func (c *Client) GetLatestTagReference(referRemote bool) (*plumbing.Reference, error)

func (*Client) GetRevisionReferenceName added in v0.21.3

func (c *Client) GetRevisionReferenceName(name string) (plumbing.ReferenceName, error)

func (*Client) Info added in v0.23.0

func (c *Client) Info() (Info, error)

func (*Client) Initialized added in v0.3.0

func (c *Client) Initialized() bool

func (*Client) InitializedWithRemote added in v0.3.0

func (c *Client) InitializedWithRemote() bool

func (*Client) IsClean added in v0.18.0

func (c *Client) IsClean() (bool, error)

func (*Client) MirrorBranch added in v0.16.0

func (c *Client) MirrorBranch(src, dst string) error

func (*Client) Pull

func (c *Client) Pull(branch string) error

func (*Client) PullAll added in v0.28.0

func (c *Client) PullAll() error

func (*Client) Push

func (c *Client) Push() error

func (*Client) ReadFiles added in v0.7.0

func (c *Client) ReadFiles(paths, ignoreFile, ignoreDir []string, absolutePath bool) (map[string][]byte, error)

func (*Client) ReplaceToAuthURL added in v0.36.0

func (c *Client) ReplaceToAuthURL(url *urlutil.URL, auth *AuthMethod) error

func (*Client) SubmoduleAdd

func (c *Client) SubmoduleAdd(name, url, revision string, auth *AuthMethod) error

func (*Client) SubmoduleSyncUpToDate added in v0.8.0

func (c *Client) SubmoduleSyncUpToDate(message string) error

func (*Client) SubmoduleUpdate

func (c *Client) SubmoduleUpdate(remote bool) error

func (*Client) SubmoduleUpdateAuth added in v0.36.0

func (c *Client) SubmoduleUpdateAuth(path, url string, auth *AuthMethod) error

type ClientOpt

type ClientOpt struct {
	CreateBranch bool
	DirPath      string
	OriginURL    string
	Revision     string
	AuthorName   string
	AuthorEmail  string
	Auth         AuthMethod
}

type Info added in v0.23.0

type Info struct {
	DirPath      string
	Current      string
	BranchHashes map[string]string
	Status       []string
	Submodules   map[string]Info
	Remote       *Info
}

type Mock added in v0.19.0

type Mock struct {
	// Local Client
	C Client
	// Rmote Repository Client
	RC *Client
}

func NewMock added in v0.19.0

func NewMock(o MockOpt) (Mock, error)

func (*Mock) ClientOpt added in v0.28.0

func (m *Mock) ClientOpt() ClientOpt

func (*Mock) DirPath added in v0.20.0

func (m *Mock) DirPath() string

func (*Mock) RandomCommitLocal added in v0.33.0

func (m *Mock) RandomCommitLocal(branch string, push bool) error

func (*Mock) RandomCommitRemote added in v0.33.0

func (m *Mock) RandomCommitRemote(branch string) error

func (*Mock) RemoteClientOpt added in v0.28.0

func (m *Mock) RemoteClientOpt() ClientOpt

type MockCommit added in v0.19.0

type MockCommit struct {
	Message string
	Files   map[string][]byte
}

type MockOpt added in v0.19.0

type MockOpt struct {
	OriginURL     string
	CurrentBranch string
	Branches      []string
	Commits       []MockCommit
	StagedFile    map[string][]byte
	UnstagedFile  map[string][]byte
	Remote        *MockOpt
	RC            *Client
}

type SubmoduleOpt added in v0.19.0

type SubmoduleOpt struct {
	Path string
}

Jump to

Keyboard shortcuts

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