Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrWrongRepoPath = errors.Const("wrong repo path") ErrRepoPathNotEmpty = errors.Const("repo path directory is not empty") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOption ¶
type AddOption func(o *gogit.AddOptions)
type CheckoutOption ¶
type CheckoutOption func(o *gogit.CheckoutOptions)
func ForceCheckout ¶
func ForceCheckout() CheckoutOption
func KeepCheckout ¶
func KeepCheckout() CheckoutOption
func WithCreate ¶
func WithCreate() CheckoutOption
type CommitOption ¶
type CommitOption func(o *gogit.CommitOptions)
func CommitAll ¶
func CommitAll() CommitOption
func WithAuthor ¶
func WithAuthor(user, email string, t time.Time) CommitOption
func WithCommiter ¶
func WithCommiter(user, email string, t time.Time) CommitOption
type OptionFunc ¶ added in v1.0.2
type OptionFunc interface {
CheckoutOption |
AddOption |
CommitOption |
PushOption
}
type OptionType ¶ added in v1.0.2
type OptionType interface {
*gogit.CheckoutOptions |
*gogit.AddOptions |
*gogit.CommitOptions |
*gogit.PushOptions
}
type PushOption ¶
type PushOption func(o *gogit.PushOptions)
func ForcePush ¶
func ForcePush() PushOption
func WithAtomic ¶
func WithAtomic() PushOption
func WithOpts ¶
func WithOpts(opts map[string]string) PushOption
func WithRemote ¶
func WithRemote(r string) PushOption
func WithRemoteURL ¶
func WithRemoteURL(rurl string) PushOption
func WithTags ¶
func WithTags() PushOption
type Repo ¶
type Repo interface {
Pull() (Repo, error)
Head() (Ref, error)
Checkout(target string, options ...CheckoutOption) error
Add(opts ...AddOption) error
Commit(message string, opts ...CommitOption) (string, error)
Push(options ...PushOption) error
Remotes() map[string][]string
}
Click to show internal directories.
Click to hide internal directories.