Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilOpts = errors.New("options cannot be nil") ErrRepoNotFound = errors.New("git repository not found") )
Errors
View Source
var (
ErrProviderNotSupported = errors.New("git provider not supported")
)
Errors
Functions ¶
This section is empty.
Types ¶
type CloneOptions ¶
type CreateRepoOptions ¶
type GetRepoOptions ¶
type Provider ¶
type Provider interface { // CreateRepository creates the repository in the remote provider and returns a // clone url CreateRepository(ctx context.Context, opts *CreateRepoOptions) (string, error) GetRepository(ctx context.Context, opts *GetRepoOptions) (string, error) }
Provider represents a git provider
type PushOptions ¶
type Repository ¶
type Repository interface { Add(ctx context.Context, pattern string) error AddRemote(ctx context.Context, name, url string) error // Commits all files and returns the commit sha Commit(ctx context.Context, msg string) (string, error) Push(context.Context, *PushOptions) error IsNewRepo() (bool, error) Root() (string, error) }
Repository represents a git repository
func Clone ¶
func Clone(ctx context.Context, opts *CloneOptions) (Repository, error)
Click to show internal directories.
Click to hide internal directories.