Documentation
¶
Index ¶
- Constants
- func WithDiskStorage(g *Client) error
- func WithMemoryStorage(g *Client) error
- type Client
- func (g *Client) Clone(ctx context.Context, url string, checkoutOpts git.CheckoutOptions) (*git.Commit, error)
- func (g *Client) Commit(info git.Commit, signer *openpgp.Entity) (string, error)
- func (g *Client) Head() (string, error)
- func (g *Client) Init(ctx context.Context, url, branch string) error
- func (g *Client) IsClean() (bool, error)
- func (g *Client) Path() string
- func (g *Client) Push(ctx context.Context) error
- func (g *Client) SwitchBranch(ctx context.Context, branchName string) error
- func (g *Client) WriteFile(path string, reader io.Reader) error
- type ClientOption
- type CustomPublicKeys
Constants ¶
View Source
const ClientName = "go-git"
ClientName is the string representation of Client.
Variables ¶
This section is empty.
Functions ¶
func WithDiskStorage ¶
func WithMemoryStorage ¶
Types ¶
type Client ¶
type Client struct {
*git.DiscardRepositoryCloser
// contains filtered or unexported fields
}
Client implements git.RepositoryClient.
func NewClient ¶
func NewClient(path string, authOpts *git.AuthOptions, clientOpts ...ClientOption) (*Client, error)
NewClient returns a new GoGitClient.
func (*Client) SwitchBranch ¶
type ClientOption ¶
func WithStorer ¶
func WithStorer(s storage.Storer) ClientOption
func WithWorkTreeFS ¶
func WithWorkTreeFS(wt billy.Filesystem) ClientOption
type CustomPublicKeys ¶
type CustomPublicKeys struct {
// contains filtered or unexported fields
}
CustomPublicKeys is a wrapper around ssh.PublicKeys to help us customize the ssh config. It implements ssh.AuthMethod.
func (*CustomPublicKeys) ClientConfig ¶
func (a *CustomPublicKeys) ClientConfig() (*gossh.ClientConfig, error)
func (*CustomPublicKeys) Name ¶
func (a *CustomPublicKeys) Name() string
func (*CustomPublicKeys) String ¶
func (a *CustomPublicKeys) String() string
Click to show internal directories.
Click to hide internal directories.