repository

package
v0.0.0-...-5f29aa1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CopyFile is mocked for tests.
	CopyFile = util.CopyFile
	// CopyDir is mocked for tests.
	CopyDir = util.CopyDir
)

Functions

This section is empty.

Types

type Repository

type Repository struct {
	Git     string    `yaml:"git"`     // Git url of Git repository to clone.
	Version string    `yaml:"version"` // Version of Git repository to use.
	DstDir  string    `yaml:"dstDir"`  // DstDir destination directory to copy clone to.
	Sources []Sources // Sources containing files and/or directories to copy.
	GiltDir string    // GiltDir option set from CLI.
}

Repository containing the repository's details.

func (*Repository) CopySources

func (r *Repository) CopySources() error

CopySources copy Repository.Src to Repository.DstFile or Repository.DstDir.

func (*Repository) GetCloneDir

func (r *Repository) GetCloneDir() string

GetCloneDir returns the path to the Repository's clone directory.

type Sources

type Sources struct {
	Src     string `yaml:"src"`     // Src source file or directory to copy.
	DstFile string `yaml:"dstFile"` // DstFile destination of file copy.
	DstDir  string `yaml:"dstDir"`  // DstDir destination of directory copy.
}

Sources mapping of files and/or directories needing copied.

Jump to

Keyboard shortcuts

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