Documentation
¶
Index ¶
- Constants
- type Client
- func (g *Client) Clone(ctx context.Context, url string, cloneOpts repository.CloneOptions) (*git.Commit, error)
- func (g *Client) Commit(info git.Commit, commitOpts ...repository.CommitOption) (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
- type ClientOption
- type CustomPublicKeys
Constants ¶
View Source
const ClientName = "go-git"
ClientName is the string representation of Client.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*repository.DiscardCloser
// contains filtered or unexported fields
}
Client implements repository.Client.
func NewClient ¶
func NewClient(path string, authOpts *git.AuthOptions, clientOpts ...ClientOption) (*Client, error)
NewClient returns a new GoGitClient.
func (*Client) Clone ¶
func (g *Client) Clone(ctx context.Context, url string, cloneOpts repository.CloneOptions) (*git.Commit, error)
func (*Client) Commit ¶
func (g *Client) Commit(info git.Commit, commitOpts ...repository.CommitOption) (string, error)
type ClientOption ¶
func WithDiskStorage ¶
func WithDiskStorage() ClientOption
func WithForcePush ¶ added in v0.2.0
func WithForcePush() ClientOption
WithForcePush enables the use of force push for all push operations back to the Git repository. By default this is disabled.
func WithInsecureCredentialsOverHTTP ¶ added in v0.2.0
func WithInsecureCredentialsOverHTTP() ClientOption
WithInsecureCredentialsOverHTTP enables credentials being used over HTTP. This is not recommended for production environments.
func WithMemoryStorage ¶
func WithMemoryStorage() 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
Directories
¶
| Path | Synopsis |
|---|---|
|
Package securejoin is an implementation of the hopefully-soon-to-be-included SecureJoin helper that is meant to be part of the "path/filepath" package.
|
Package securejoin is an implementation of the hopefully-soon-to-be-included SecureJoin helper that is meant to be part of the "path/filepath" package. |
Click to show internal directories.
Click to hide internal directories.