Documentation ¶
Index ¶
- func GetDependencyDefinitionTemplates(parentTemplate *template.Template, packageDir string) ([]*template.Template, error)
- func GetExecutableTemplates(parentTemplate *template.Template, packageDir string) ([]*template.Template, error)
- func GetHighestPackageVersion(kpmHomeDir string, packageName string) (string, error)
- func GetOutputFriendlyName(outputName string, packageFullName string) string
- func GetPackageFullNamesFromLocalRepository(kpmHomeDir string) ([]string, error)
- func GetPackageInfo(kpmHomeDir string, packageDir string) (*types.PackageInfo, error)
- func GetPackageParameters(parametersFile string) (*types.GenericMap, error)
- func GetSharedTemplate(packageDir string) (*template.Template, error)
- func GetTemplateInput(kpmHomeDir string, packageFullName string, parentTemplate *template.Template, ...) (*types.GenericMap, error)
- func PullPackage(kpmHomeDir string, dockerRegistry string, packageName string, ...) error
- type DependencyTree
- type PackageNamesAndVersions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDependencyDefinitionTemplates ¶
func GetDependencyDefinitionTemplates(parentTemplate *template.Template, packageDir string) ([]*template.Template, error)
GetDependencyDefinitionTemplates returns the templates for all dependency definition templates in a template package.
func GetExecutableTemplates ¶
func GetExecutableTemplates(parentTemplate *template.Template, packageDir string) ([]*template.Template, error)
GetExecutableTemplates returns all executable templates in a template package.
func GetHighestPackageVersion ¶
GetHighestPackageVersion returns the highest available package version found in the local KPM repository.
func GetOutputFriendlyName ¶
GetOutputFriendlyName returns the friendly name given an output name and a package's full name.
func GetPackageFullNamesFromLocalRepository ¶
GetPackageFullNamesFromLocalRepository returns the list of package names in the local KPM package repository, in alphabetical order.
func GetPackageInfo ¶
func GetPackageInfo(kpmHomeDir string, packageDir string) (*types.PackageInfo, error)
GetPackageInfo validates the package directory and returns the package info object for a given package.
func GetPackageParameters ¶
func GetPackageParameters(parametersFile string) (*types.GenericMap, error)
GetPackageParameters returns the parameters in a file as an object which can be used as input to the interface template in a package.
func GetSharedTemplate ¶
GetSharedTemplate creates a template which contains default options, functions and helper template definitions defined in the given package.
func GetTemplateInput ¶
func GetTemplateInput(kpmHomeDir string, packageFullName string, parentTemplate *template.Template, parameters *types.GenericMap) (*types.GenericMap, error)
GetTemplateInput creates the input values for a template by combining the interface, parameters and package info.
Types ¶
type DependencyTree ¶
type DependencyTree struct {
// contains filtered or unexported fields
}
DependencyTree is the definition of the package dependency tree.
func GetDependencyTree ¶
func GetDependencyTree(kpmHomeDir string, packageName string, packageVersion string, dockerRegistry string, outputName string, parameters *types.GenericMap) (*DependencyTree, error)
GetDependencyTree ensures that the dependency tree has no loops and then returns the dependency tree.
func (*DependencyTree) VisitNodesDepthFirst ¶
func (tree *DependencyTree) VisitNodesDepthFirst(consumeNode func(relativeFilePath []string, friendlyNamePath []string, executableTemplates []*template.Template, templateInput *types.GenericMap) error) (int, error)
VisitNodesDepthFirst visits nodes in the tree in depth-first fashion, applying the given consumer function on each node. It returns the number of nodes that were visited.
type PackageNamesAndVersions ¶
PackageNamesAndVersions is the mapping of package names to its list of versions.
func GetAvailablePackagesAndVersions ¶
func GetAvailablePackagesAndVersions(kpmHomeDir string) (PackageNamesAndVersions, error)
GetAvailablePackagesAndVersions retrieves the list of available packages and their versions.