Documentation ¶
Index ¶
- type GitRepo
- func (g *GitRepo) Clone(ctx context.Context, repo entity.Repository) (entity.Repository, error)
- func (g *GitRepo) GetHeadSha(ctx context.Context, r entity.Repository) (string, error)
- func (g *GitRepo) GetManifest(ctx context.Context, repo entity.Repository, filepath string) (entity.Manifest, error)
- func (g *GitRepo) GetManifests(ctx context.Context, repo entity.Repository, ...) ([]entity.Manifest, error)
- func (g *GitRepo) Open(ctx context.Context, r entity.Repository) (entity.Repository, error)
- func (g *GitRepo) Pull(ctx context.Context, r entity.Repository) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitRepo ¶
type GitRepo struct {
// contains filtered or unexported fields
}
func (*GitRepo) Clone ¶
func (g *GitRepo) Clone(ctx context.Context, repo entity.Repository) (entity.Repository, error)
func (*GitRepo) GetHeadSha ¶
GetHeadSha returns the head sha for the specified repo. It does not pull before returning the sha.
func (*GitRepo) GetManifest ¶
func (g *GitRepo) GetManifest(ctx context.Context, repo entity.Repository, filepath string) (entity.Manifest, error)
GetManifest return the manifest referred by ref
func (*GitRepo) GetManifests ¶
func (g *GitRepo) GetManifests(ctx context.Context, repo entity.Repository, filterFn func(m entity.Manifest) bool) ([]entity.Manifest, error)
GetManifests returns all the manifest of a repo.
func (*GitRepo) Open ¶
func (g *GitRepo) Open(ctx context.Context, r entity.Repository) (entity.Repository, error)
Open opens the git repo. If the repo does not exists in the local storage it will be cloned from remote. Returns a new entity with updated information if the repo was cloned.
Click to show internal directories.
Click to hide internal directories.