Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Copy ¶
type Copy struct {
// contains filtered or unexported fields
}
Copy copy implementation.
func (*Copy) CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func (*Copy) CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
type CopyManager ¶
type CopyManager interface { CopyDir(src string, dst string) error CopyFile(src string, dst string) error }
CopyManager manager responsible for Copy operations.
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository contains the repository's details for cloning.
func New ¶
func New( appFs afero.Fs, copyManager CopyManager, gitManager internal.GitManager, logger *slog.Logger, ) *Repository
New factory to create a new Repository instance.
func (*Repository) Clone ¶
func (r *Repository) Clone( c config.Repository, cloneDir string, ) (string, error)
Clone Repository.Git under Repository.getCloneDir
func (*Repository) CopySources ¶
func (r *Repository) CopySources( c config.Repository, cloneDir string, ) error
CopySources copy Repository.Src to Repository.DstFile or Repository.DstDir.
func (*Repository) Worktree ¶ added in v1.0.2
func (r *Repository) Worktree( c config.Repository, cloneDir string, targetDir string, ) error
Create a Workingtree at the given version in Repository.DstDir.