Documentation
¶
Overview ¶
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Index ¶
- Constants
- Variables
- func CopyFileContents(src string, dst string) (err error)
- func Execute()
- func IsXMLDirEmpty(dir string) (bool, error)
- func NewAnalyzeCmd(log logr.Logger) *cobra.Command
- func NewOpenRewriteCommand(log logr.Logger) *cobra.Command
- func NewTestCommand(log logr.Logger) *cobra.Command
- func NewTransformCommand(log logr.Logger) *cobra.Command
- func NewVersionCommand() *cobra.Command
- func NewWindupShimCommand(log logr.Logger) *cobra.Command
- type Application
- type Config
- type ProviderInit
Constants ¶
View Source
const ( RulesetPath = "/opt/rulesets" OpenRewriteRecipesPath = "/opt/openrewrite" InputPath = "/opt/input" OutputPath = "/opt/output" XMLRulePath = "/opt/xmlrules" ShimOutputPath = "/opt/shimoutput" CustomRulePath = "/opt/input/rules" )
analyzer container paths
View Source
const ( JavaArchive = ".jar" WebArchive = ".war" EnterpriseArchive = ".ear" ClassFile = ".class" )
valid java file extensions
Variables ¶
View Source
var ( // TODO (pgaikwad): this assumes that the $USER in container is always root, it may not be the case in future M2Dir = path.Join("/", "root", ".m2") // application source path inside the container SourceMountPath = path.Join(InputPath, "source") // analyzer config files ConfigMountPath = path.Join(InputPath, "config") // user provided rules path RulesMountPath = path.Join(RulesetPath, "input") // paths to files in the container AnalysisOutputMountPath = path.Join(OutputPath, "output.yaml") DepsOutputMountPath = path.Join(OutputPath, "dependencies.yaml") ProviderSettingsMountPath = path.Join(ConfigMountPath, "settings.json") DotnetFrameworks = map[string]bool{ "v1.0": false, "v1.1": false, "v2.0": false, "v3.0": false, "v3.5": false, "v4": false, "v4.5": true, "v4.5.1": true, "v4.5.2": true, "v4.6": true, "v4.6.1": true, "v4.6.2": true, "v4.7": true, "v4.7.1": true, "v4.7.2": true, "v4.8": true, "v4.8.1": true, } )
View Source
var ( RootCommandName = "kantra" JavaBundlesLocation = "/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar" JDTLSBinLocation = "/jdtls/bin/jdtls" RulesetsLocation = "rulesets" JavaProviderImage = "quay.io/konveyor/java-external-provider" GenericProviderImage = "quay.io/konveyor/generic-external-provider" DotnetProviderImage = "quay.io/konveyor/dotnet-external-provider" )
View Source
var ( BuildCommit = "" Version = "latest" RunnerImage = "quay.io/konveyor/kantra" )
View Source
var Settings = &Config{}
Functions ¶
func CopyFileContents ¶ added in v0.6.1
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func IsXMLDirEmpty ¶ added in v0.6.0
func NewAnalyzeCmd ¶
analyzeCmd represents the analyze command
func NewVersionCommand ¶ added in v0.3.1
Use build flags to set correct Version and BuildCommit e.g.: --ldflags="-X 'github.com/konveyor-ecosystem/kantra/cmd.Version=1.2.3' -X 'github.com/konveyor-ecosystem/kantra/cmd.BuildCommit=$(git rev-parse HEAD)'"
Types ¶
type Application ¶ added in v0.6.0
type Config ¶
type Config struct { RootCommandName string `env:"CMD_NAME" default:"kantra"` ContainerBinary string `env:"CONTAINER_TOOL" default:"/usr/bin/podman"` RunnerImage string `env:"RUNNER_IMG" default:"quay.io/konveyor/kantra"` RunLocal bool `env:"RUN_LOCAL"` JvmMaxMem string `env:"JVM_MAX_MEM" default:""` JavaProviderImage string `env:"JAVA_PROVIDER_IMG" default:"quay.io/konveyor/java-external-provider:latest"` GenericProviderImage string `env:"GENERIC_PROVIDER_IMG" default:"quay.io/konveyor/generic-external-provider:latest"` DotnetProviderImage string `env:"DOTNET_PROVIDER_IMG" default:"quay.io/konveyor/dotnet-external-provider:latest"` }
type ProviderInit ¶ added in v0.5.0
type ProviderInit struct {
// contains filtered or unexported fields
}
TODO add network and volume w/ interface
Source Files
¶
Click to show internal directories.
Click to hide internal directories.