Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoGitRepository = errors.New("no git repository") ErrNoStagedFiles = errors.New("no staged files") )
Functions ¶
This section is empty.
Types ¶
type CommitOptions ¶
type CommitOptions struct {
*GPGSigningInfo
}
CommitOptions contains options for making a commit.
type GPGSigningInfo ¶
GPGSigningInfo contains information for signing a commit.
type Git ¶
type Git interface {
Repository() *gogit.Repository
Init(url, branch string) (bool, error)
Clone(ctx context.Context, url, branch string, caBundle []byte) (bool, error)
Write(path string, reader io.Reader) error
Commit(message Commit, options ...Option) (string, error)
Push(ctx context.Context, caBundle []byte) error
Status() (bool, error)
Head() (string, error)
CreateRemote(url, name string) (string, error)
Path() string
}
Git is an interface for basic Git operations on a single branch of a remote repository.
type GpgSigningOption ¶
type GpgSigningOption struct {
*GPGSigningInfo
}
func (GpgSigningOption) ApplyToCommit ¶
func (w GpgSigningOption) ApplyToCommit(in *CommitOptions)
type Option ¶
type Option interface {
// ApplyToCommit applies this configuration to a given commit option.
ApplyToCommit(*CommitOptions)
}
Option is a some configuration that modifies options for a commit.
func WithGpgSigningOption ¶
Click to show internal directories.
Click to hide internal directories.