Documentation
¶
Index ¶
- func AuthenticateToRepository(repository *git.GitRepository, gitToken string)
- func CalculatePath(path string, defaultName string) (string, error)
- func CloneRepository(repository *git.GitRepository, clonePath string) error
- func CreateAndValidateRepository(repositoryURL, branch, tag string) (*git.GitRepository, error)
- func DeleteIgnoredPaths(directory string, ignorePaths []string)
- func FillDirectory(src string, ignorePaths []string, outputInTerminal bool, ...) error
- func GetCurrentWorkingDirectory() (string, error)
- func GetUserVariablesMap(currentDir, variables string) (map[string]interface{}, error)
- func MatchUserVariables(cloneyMetadata *metadata.CloneyMetadata, variablesMap map[string]interface{}) error
- func ParseRepositoryMetadata(metadataContent string, supportedManifestVersions []string) (*metadata.CloneyMetadata, error)
- func ReadRepositoryMetadata(metadataFilePath string) (string, error)
- func SetSuppressPrints(value bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateToRepository ¶
func AuthenticateToRepository(repository *git.GitRepository, gitToken string)
AuthenticateToRepository authenticates to the repository if a token is provided.
func CalculatePath ¶
CalculatePath calculates the absolute path for a given relative or absolute path string. If the path is already absolute, it is returned as-is. If the path is empty, the defaultName is appended to the current working directory. Otherwise, the path is appended to the current working directory.
func CloneRepository ¶
func CloneRepository(repository *git.GitRepository, clonePath string) error
CloneRepository clones the repository.
func CreateAndValidateRepository ¶
func CreateAndValidateRepository(repositoryURL, branch, tag string) (*git.GitRepository, error)
CreateAndValidateRepository creates the Git repository instance and validates it.
func DeleteIgnoredPaths ¶
DeleteIgnoredPaths removes files and directories from the specified 'directory' if their paths match any of the patterns listed in 'cloneyMetadata.Configuration.IgnorePaths'. It iterates through the ignore paths and deletes them recursively.
Parameters:
- cloneyMetadata: The metadata containing the configuration of the template repository.
- directory: The base directory from which to start removing files and directories.
func FillDirectory ¶
func FillDirectory( src string, ignorePaths []string, outputInTerminal bool, variablesMap map[string]interface{}) error
FillDirectory fills template variables in files within the source directory.
func GetCurrentWorkingDirectory ¶
GetCurrentWorkingDirectory returns the current working directory.
func GetUserVariablesMap ¶
GetUserVariablesMap returns the template variables provided by the user.
func MatchUserVariables ¶
func MatchUserVariables(cloneyMetadata *metadata.CloneyMetadata, variablesMap map[string]interface{}) error
MatchUserVariables matches the user variables with the template variables.
func ParseRepositoryMetadata ¶
func ParseRepositoryMetadata(metadataContent string, supportedManifestVersions []string) (*metadata.CloneyMetadata, error)
ParseRepositoryMetadata parses the repository metadata.
func ReadRepositoryMetadata ¶
ReadRepositoryMetadata reads the repository metadata.
func SetSuppressPrints ¶
func SetSuppressPrints(value bool)
SetSuppressPrints sets the suppressPrints flag.
Types ¶
This section is empty.