Documentation
¶
Index ¶
- Constants
- func RemoteCallbacks() git2go.RemoteCallbacks
- func WithDiskStorage(l *Client) error
- func WithMemoryStorage(l *Client) error
- type Client
- func (l *Client) Clone(ctx context.Context, url string, checkoutOpts git.CheckoutOptions) (*git.Commit, error)
- func (l *Client) Close()
- func (l *Client) Commit(info git.Commit, signer *openpgp.Entity) (string, error)
- func (l *Client) Head() (string, error)
- func (l *Client) Init(ctx context.Context, url, branch string) error
- func (l *Client) IsClean() (bool, error)
- func (l *Client) Path() string
- func (l *Client) Push(ctx context.Context) error
- func (l *Client) SwitchBranch(ctx context.Context, branchName string) error
- func (l *Client) WriteFile(path string, reader io.Reader) error
- type ClientOption
Constants ¶
View Source
const ClientName = "libgit2"
ClientName is the string representation of Client.
Variables ¶
This section is empty.
Functions ¶
func RemoteCallbacks ¶
func RemoteCallbacks() git2go.RemoteCallbacks
RemoteCallbacks constructs git2go.RemoteCallbacks with dummy callbacks. Our smart transports don't require any callbacks but, passing nil to high level git2go functions like Push, Clone can result in panic, thus it's safer to use no-op functions.
func WithDiskStorage ¶
func WithMemoryStorage ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(path string, authOpts *git.AuthOptions, clientOpts ...ClientOption) (*Client, error)
func (*Client) SwitchBranch ¶
type ClientOption ¶
Click to show internal directories.
Click to hide internal directories.