gx

package
v0.0.0-...-c798857 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extraction

type Extraction struct {
	// Holds a file if source path is a file
	File billy.File
	// Holds a folder if source path is a folder
	Folder billy.Dir
}

holds values related to the extraction of a git repository.

func (Extraction) Write

func (e Extraction) Write(target string) error

write extraction to host filesystem

type Repository

type Repository struct {
	// Url is the url of the git repository.
	Url string
	// Branch is the branch name.
	Branch string
	// FileSystem is the filesystem that the repository is being extracted to.
	FileSystem billy.Filesystem
	// Source is the path to extract from in the git repository.
	Source string
}

holds values related to a git repository the extraction is being performed on.

func NewRepository

func NewRepository(url string, branch string, source string) (Repository, error)

create struct to hold data related to the repository to extract from

func (*Repository) Clone

func (r *Repository) Clone() error

clone the repository to the memory filesystem.

func (*Repository) Extract

func (r *Repository) Extract() (Extraction, error)

extract the specified source and returns it as part of Extraction struct

Jump to

Keyboard shortcuts

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