git

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package git is used for encapsulating all the interaction with Git

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

File rappresent a file downloaded in the in memory store

func (*File) WriteContent added in v0.10.0

func (f *File) WriteContent(targetPath string) error

WriteContent copy the file content to targetPath mantaining the folder structure

type FilesGetter

type FilesGetter struct {
	// contains filtered or unexported fields
}

FilesGetter is responsible to download and manage remote git repository in a in memory storage

func NewFilesGetter added in v0.10.0

func NewFilesGetter() *FilesGetter

NewFilesGetter create a new FilesGetter instance configured for downloading from remote repository using an in memory storage

func NewTestFilesGetter added in v0.10.0

func NewTestFilesGetter(t *testing.T) (*FilesGetter, billy.Filesystem)

NewTestFilesGetter return a FilesGetter with a fixed worktree and will not make calls to remote repositories

func (*FilesGetter) GetFilesForPackage added in v0.10.0

func (r *FilesGetter) GetFilesForPackage(pkg v1alpha1.Package) ([]*File, error)

GetFilesForPackage clones the pkg from the remote repository and return all the files relative for the package or an error otherwise

Jump to

Keyboard shortcuts

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