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
Click to show internal directories.
Click to hide internal directories.