enricher

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvPort

func GetEnvPort(envPlaceholder string) int

func GetEnvPortFromDockerfile added in v1.1.5

func GetEnvPortFromDockerfile(envPlaceholder string, path string) int

GetEnvPortFromDockerfile returns a port value from the Dockerfile (locations provided by the 'utils.GetLocations' function) matching the specified 'envPlaceHolder'. It first extracts the environment variable name to lookup from 'envPlaceholder' by removing any 'process.env.' prefix. It then searches through all environment variables detected from the Dockerfile (as determined by 'utils.GetEnvVarsFromDockerFile'). And if the environment variable specified via 'envPlaceholder' is found in the Dockerfile environment variables and its corresponding value is a valid port (as determined by 'utils.GetValidPort'), it returns this valid port value.

If there is an error reading the Dockerfile or if the environment variable specified via 'envPlaceholder' is not found among the Dockerfile environment variables, the function returns -1.

Types

type AngularDetector

type AngularDetector struct{}

func (AngularDetector) DoFrameworkDetection

func (a AngularDetector) DoFrameworkDetection(language *model.Language, config string)

DoFrameworkDetection uses a tag to check for the framework name

func (AngularDetector) DoPortsDetection

func (a AngularDetector) DoPortsDetection(component *model.Component, ctx *context.Context)

DoPortsDetection searches for the port in angular.json, package.json, and angular-cli.json

func (AngularDetector) GetApplicationFileInfos added in v1.2.0

func (a AngularDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo

func (AngularDetector) GetSupportedFrameworks

func (a AngularDetector) GetSupportedFrameworks() []string

type ExpressDetector

type ExpressDetector struct{}

func (ExpressDetector) DoFrameworkDetection

func (e ExpressDetector) DoFrameworkDetection(language *model.Language, config string)

DoFrameworkDetection uses a tag to check for the framework name

func (ExpressDetector) DoPortsDetection

func (e ExpressDetector) DoPortsDetection(component *model.Component, ctx *context.Context)

func (ExpressDetector) GetApplicationFileInfos added in v1.2.0

func (e ExpressDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo

func (ExpressDetector) GetSupportedFrameworks

func (e ExpressDetector) GetSupportedFrameworks() []string

type NextDetector

type NextDetector struct{}

func (NextDetector) DoFrameworkDetection

func (n NextDetector) DoFrameworkDetection(language *model.Language, config string)

DoFrameworkDetection uses a tag to check for the framework name

func (NextDetector) DoPortsDetection

func (n NextDetector) DoPortsDetection(component *model.Component, ctx *context.Context)

DoPortsDetection searches for the port in package.json

func (NextDetector) GetApplicationFileInfos added in v1.2.0

func (a NextDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo

func (NextDetector) GetSupportedFrameworks

func (n NextDetector) GetSupportedFrameworks() []string

type NuxtDetector

type NuxtDetector struct{}

func (NuxtDetector) DoFrameworkDetection

func (n NuxtDetector) DoFrameworkDetection(language *model.Language, config string)

DoFrameworkDetection uses a tag to check for the framework name

func (NuxtDetector) DoPortsDetection

func (n NuxtDetector) DoPortsDetection(component *model.Component, ctx *context.Context)

DoPortsDetection searches for the port in package.json, and nuxt.config.js

func (NuxtDetector) GetApplicationFileInfos added in v1.2.0

func (n NuxtDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo

func (NuxtDetector) GetSupportedFrameworks

func (n NuxtDetector) GetSupportedFrameworks() []string

type ReactJsDetector

type ReactJsDetector struct{}

func (ReactJsDetector) DoFrameworkDetection

func (r ReactJsDetector) DoFrameworkDetection(language *model.Language, config string)

DoFrameworkDetection uses a tag to check for the framework name

func (ReactJsDetector) DoPortsDetection

func (r ReactJsDetector) DoPortsDetection(component *model.Component, ctx *context.Context)

DoPortsDetection searches for the port in the env var, .env file, and package.json

func (ReactJsDetector) GetApplicationFileInfos added in v1.2.0

func (r ReactJsDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo

func (ReactJsDetector) GetSupportedFrameworks

func (r ReactJsDetector) GetSupportedFrameworks() []string

type SvelteDetector

type SvelteDetector struct{}

func (SvelteDetector) DoFrameworkDetection

func (s SvelteDetector) DoFrameworkDetection(language *model.Language, config string)

DoFrameworkDetection uses a tag to check for the framework name

func (SvelteDetector) DoPortsDetection

func (s SvelteDetector) DoPortsDetection(component *model.Component, ctx *context.Context)

DoPortsDetection searches for the port in package.json

func (SvelteDetector) GetApplicationFileInfos added in v1.2.0

func (s SvelteDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo

func (SvelteDetector) GetSupportedFrameworks

func (s SvelteDetector) GetSupportedFrameworks() []string

type VueDetector

type VueDetector struct{}

func (VueDetector) DoFrameworkDetection

func (v VueDetector) DoFrameworkDetection(language *model.Language, config string)

DoFrameworkDetection uses a tag to check for the framework name

func (VueDetector) DoPortsDetection

func (v VueDetector) DoPortsDetection(component *model.Component, ctx *context.Context)

DoPortsDetection searches for the port in package.json, .env file, and vue.config.js

func (VueDetector) GetApplicationFileInfos added in v1.2.0

func (v VueDetector) GetApplicationFileInfos(componentPath string, ctx *context.Context) []model.ApplicationFileInfo

func (VueDetector) GetSupportedFrameworks

func (v VueDetector) GetSupportedFrameworks() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL