git

package
v0.0.0-...-bff9524 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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 New

func New(localStorage string) *GitRepo

func (*GitRepo) Clone

func (g *GitRepo) Clone(ctx context.Context, repo entity.Repository) (entity.Repository, error)

func (*GitRepo) GetHeadSha

func (g *GitRepo) GetHeadSha(ctx context.Context, r entity.Repository) (string, error)

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

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.

func (*GitRepo) Pull

func (g *GitRepo) Pull(ctx context.Context, r entity.Repository) error

Pull pull from origin the repo.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL