package
0.4.0-alpha.0
Repository: https://github.com/konveyor/move2kube.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

AppendIfNotPresent checks if a value is present in a slice and if not appends it to the slice.
CleanAndFindCommonDirectory finds the common ancestor directory among a list of absolute paths.
ConvertInterfaceToSliceOfStrings converts an interface{} to a []string type.
ConvertStringSelectorsToSelectors converts selector string to selector object.
CopyEmbedFSToDir converts a string into a directory.
CopyFile copies a file from src to dst.
CreateAssetsData creates an assets directory and dumps the assets data into it.
CreateTarArchiveGZipStringWrapper can be used to archive a set of files and compression using gzip and return tar archive string.
CreateTarArchiveNoCompressionStringWrapper can be used to archive a set of files and compression without compression and return tar archive string.
EncryptAesCbcWithPbkdfWrapper can be used to encrypt the data using AES 256 CBC mode with Pbkdf key derivation.
EncryptRsaCertWrapper can be used to encrypt the data using RSA PKCS1v15 algorithm with certificate as key.
Filter returns the elements that satisfy the condition.
FindCommonDirectory finds the common ancestor directory among a list of cleaned absolute paths.
FindIndex returns the index of the first element that satisfies the condition.
GatherGitInfo tries to find the git repo for the path if one exists.
GetClosestMatchingString returns the closest matching string for a given search string.
GetFilesByExt returns files by extension.
GetFilesByExtInCurrDir returns the files present in current directory which have one of the specified extensions.
GetFilesByName returns files by name.
GetFilesInCurrentDirectory returns the name of the file present in the current directory which matches the pattern.
GetImageNameAndTag splits an image full name and returns the image name and tag.
GetMapInterfaceFromObj converts a struct to map[string]interface{} using yaml marshaller.
GetObjFromInterface loads from map[string]interface{} to struct.
GetRandomString generates a random string.
GetRuntimeObjectMetadata returns the metadata field from a k8s object.
GetSHA256Hash returns the SHA256 hash of the string.
GetStringFromTemplate returns string for a template.
GetTypesMap returns a type registry for the types in the array.
GetUnixPath return Unix Path for any path.
GetWindowsPath return Windows Path for any path.
GetYamlsWithTypeMeta returns files by yaml kind.
Interrupt creates SIGINT signal.
IsParent can be used to check if a path is one of the parent directories of another path.
IsPresent checks if a value is present in a slice.
IsSameRuntimeObject returns true if the 2 k8s resources are same.
IsStringPresent is like IsPresent but does case-insensitive comparison of strings.
JoinQASubKeys joins sub keys into a valid QA key using the proper delimiter.
MakeFileNameCompliant returns a DNS-1123 standard string Motivated by https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set Also see page 1 "ASSUMPTIONS" heading of https://tools.ietf.org/html/rfc952 Also see page 13 of https://tools.ietf.org/html/rfc1123#page-13.
MakeStringContainerImageNameCompliant makes the string into a valid image name.
MakeStringDNSLabelNameCompliant makes the string a valid DNS label name.
MakeStringDNSNameCompliant makes the string into a valid DNS name.
MakeStringDNSNameCompliantWithoutDots makes the string into a valid DNS name without dots.
MakeStringDNSSubdomainNameCompliant makes the string a valid DNS subdomain name.
MakeStringEnvNameCompliant makes the string into a valid Environment variable name.
MakeStringK8sServiceNameCompliant makes the string a valid K8s service name.
Map applies the given function over all the elements and returns a new slice with the results.
MarshalObjToYaml marshals an object to yaml.
MergeSlices merges two slices.
MergeStringMaps merges two string maps.
MergeStringSliceMaps merges two string slice maps.
NewCleanupHook creates a cleanup hook.
NormalizeForEnvironmentVariableName converts the string to be compatible for environment variable name convention specified below: https://pubs.opengroup.org/onlinepubs/9699919799/.
NormalizeForFilename normalizes a string to only filename valid characters.
NormalizeForMetadataName converts the string to be compatible for service name.
ObjectToYamlBytes encodes an object to yaml.
ReadFilesAsTar creates the Tar with given compression format and return ReadCloser interface.
ReadJSON reads an json into an object.
ReadMove2KubeYaml reads move2kube specific yaml files (like m2k.plan) into an struct.
ReadMove2KubeYamlStrict is like ReadMove2KubeYaml but returns an error when it finds unknown fields in the yaml.
ReadXML reads an json into an object.
ReadYaml reads an yaml into an object.
ReplaceStartingTerminatingHyphens replaces the first and last characters of a string if they are hyphens.
ReverseInPlace reverses a slice in place.
SplitOnDotExpectInsideQuotes splits a string on dot.
SplitYAML splits a file into multiple YAML documents.
StripQuotes strips a single layer of double or single quotes from the left and right ends Example: "github.com" -> github.com Example: 'github.com' -> github.com Example: "'github.com'" -> 'github.com'.
UniqueStrings returns a new slice with only the unique strings from the input slice.
WriteJSON writes an json to disk.
WriteYaml writes encodes object as yaml and writes it to a file.
YamlAttrPresent returns YAML attributes.

# Constants

AnnotationLabelValue represents the value when an annotation is valid.
ArtifactNameTemplatizedStringKey is the key for denoting artifact name in a templatized string.
ArtifactTypeTemplatizedStringKey is the key for denoting artifact type in a templatized string.
AssetsDir defines the dir of the assets temp directory.
BaseKey is the prefix for every key.
BatExt is the extension of bat file.
CICDDir defines the directory where the deployment artifacts are placed.
ConfigActiveMavenProfilesForServiceKeySegment represents the maven profiles used for service.
ConfigActiveSpringBootProfilesForServiceKeySegment represent the springboot profiles used for service.
ConfigApacheConfFileForServiceKeySegment represents the conf file used for service.
ConfigContainerizationKeySegment represents Containerization Key segment.
ConfigContainerizationOptionServiceKeySegment represents containerization option to use.
ConfigContainerizationTypesKey represents source type Key.
ConfigCsprojFileForServiceKeySegment represents the csproj file used for service.
ConfigFile defines the location of the config file.
ConfigImageRegistryKey represents image registry Key.
ConfigImageRegistryLoginTypeKey represents image registry login type Key.
ConfigImageRegistryNamespaceKey represents image registry namespace Key.
ConfigImageRegistryPasswordKey represents image registry login Password Key.
ConfigImageRegistryPullSecretKey represents image registry pull secret Key.
ConfigImageRegistryURLKey represents image registry url Key.
ConfigImageRegistryUserNameKey represents image registry login Username Key.
ConfigIngressClassNameKeySuffix represents the ingress class name.
ConfigIngressHostKeySuffix represents Ingress host Key.
ConfigIngressTLSKeySuffix represents ingress tls Key.
ConfigMainPythonFileForServiceKeySegment represents the main file used for service.
ConfigMinReplicasKey represents Ingress host Key.
ConfigPortForServiceKeySegment represents the port used for service.
ConfigPortsForServiceKeySegment represents the ports used for service.
ConfigPublishProfileForServiceKeySegment represents the publish profile used for service.
ConfigRepoKey represents Repo Key.
ConfigRepoKeyPathsKey represents paths of keyfiles.
ConfigRepoKeysKey represents Repo Key.
ConfigRepoLoadPrivKey represents allow load of private key of repos Key.
ConfigRepoLoadPubDomainsKey represents allow load of public key per domain of repos Key.
ConfigRepoLoadPubKey represents allow load of public key of repos Key.
ConfigRepoPrivKey represents allow load of private key of repos Key.
ConfigRepoPubKey represents allow load of public key of repos Key.
ConfigServicesChildModulesNamesKey is true if a detected child module/sub-project of a service is enabled for transformation.
ConfigServicesChildModulesSpringProfilesKey is the list of spring profiles for this child module.
ConfigServicesDotNetChildProjectsNamesKey is true if a detected child-project of a dot net service is enabled for transformation.
ConfigServicesExposeKey represents Services Expose Key.
ConfigServicesKey represents Services Key.
ConfigServicesNamesKey is true if a detected service is enabled for transformation.
ConfigSpawnContainersKey represents spwan containers option Key.
ConfigStartingPythonFileForServiceKeySegment represents the starting python file used for service.
ConfigStoragesKey represents Storages Key.
ConfigStoragesPerClaimStorageClassKey represents key for having different storage class for claim.
ConfigStoragesPVCForHostPathKey represents key for PVC for Host Path.
ConfigTargetClusterTypeKey represents target cluster type key.
ConfigTargetExistingVersionUpdate represents key which how to update versions.
ConfigTargetKey represents Target Key.
ConfigTransformersKey represents transformers Key.
ConfigTransformerTypesKey represents Transformers type Key.
DefaultBuildContainerName stores default build container name.
DefaultConfigFilePath is the default config file path.
DefaultCustomizationDir is the default path for the customization directory.
DefaultDirectoryPermission defines the default permission used when a directory is created.
DefaultDockerfileName refers to the default Dockerfile name.
DefaultExecutablePermission defines the default permission used when an executable file is created.
DefaultFilePermission defines the default permission used when a non-executable file is created.
DefaultPlanFile is the default name for the plan file.
DefaultProjectName represents the short app name.
DefaultServicePort is the default port that will be added to a service.
DefaultSourceDir defines the directory where the source files and folders are placed along with build scripts for each individual image.
Delim is the delimiter used to separate key segments.
DeployDir defines the directory where the deployment artifacts are placed.
DeploymentKind defines Deployment Kind.
DisableLocalExecutionFlag is the name of the flag that tells us whether to use allow execution of executables locally.
FailOnEmptyPlan is the name of the flag that lets the user fail when the plan is empty (zero services, zero default transformers).
GZipCompression allows archival using gzip compression format.
HelmDir defines the directory where the helm charts are placed.
IgnoreFilename is the name of the file containing the ignore rules and exceptions.
IngressKey represents ingress keyword.
IngressKind defines Ingress Kind.
MatchAll is used to set the default for a set of keys.
NoCompression allows archival without compression.
OCTemplatesDir defines the directory where the openshift templates are placed.
ProjectNameTemplatizedStringKey is the key for denoting project name in a templatized string.
QACacheFile defines the location of the QA cache file.
ScriptsDir defines the directory where the output scripts are placed.
ServiceKind defines Service Kind.
ServiceNameTemplatizedStringKey is the key for denoting service name in a templatized string.
ShExt is the extension of sh file.
Special is the special case indicator of the multi-select problems.
TempDirPrefix defines the prefix of the temp directory.
TODOAnnotation is used to annotate with TODO tasks.
TransformerSelectorKey represents transformers selector Key.
VcapApplicationEnvName refers to the VCAP_APPLICATION environment variable DefaultDockerfileName.
VcapCfSecretSuffix refers to VCAP secret suffix.
VcapServiceEnvName refers to the VCAP_SERVICES environment variable DefaultDockerfileName.
VcapSpringBootSecretSuffix refers to VCAP springboot secret suffix.
VolumePrefix defines the prefix to be used for volumes.
WindowsAnnotation tag is used tag a service to run on windows nodes.

# Variables

AssetsPath defines where all assets get stored during execution.
DefaultIgnoreDirRegexps specifies directory name regexes that would be ignored.
DefaultPVCSize stores the default PVC size.
DisableLocalExecution indicates whether to allow execution of local executables.
IgnoreEnvironment indicates whether to ignore the current environment or not.
PlanProgressNumBaseDetectTransformers keeps track of the number of transformers that finished base directory detect during planning.
PlanProgressNumDirectories keeps track of the number of files/folders analyzed during planning.
ProjectName stores the project name during an execution.
TempPath defines where all app data get stored during execution.

# Structs

CleanupHook calls the cleanup functions on fatal and panic errors.

# Type aliases

CompressionType refers to the compression type.