Documentation ¶
Index ¶
- Constants
- Variables
- func DetectTechnologiesDescriptors(path string, recursive bool, requestedTechs []string, ...) (technologiesDetected map[Technology]map[string][]string, err error)
- func DetectedTechnologiesList() (technologies []string)
- func DetectedTechnologiesToSlice(detected map[Technology]map[string][]string) []string
- type CodeLanguage
- type ContentValidator
- type TechData
- type Technology
- func (tech Technology) GetExecCommandName() string
- func (tech Technology) GetPackageDescriptor() []string
- func (tech Technology) GetPackageInstallationCommand() string
- func (tech Technology) GetPackageType() string
- func (tech Technology) GetPackageVersionOperator() string
- func (tech Technology) String() string
- func (tech Technology) ToFormal() string
Constants ¶
View Source
const Pypi = "pypi"
Variables ¶
View Source
var TechToProjectType = map[Technology]project.ProjectType{ Maven: project.Maven, Gradle: project.Gradle, Npm: project.Npm, Yarn: project.Yarn, Go: project.Go, Pip: project.Pip, Pipenv: project.Pipenv, Poetry: project.Poetry, Nuget: project.Nuget, Dotnet: project.Dotnet, }
Associates a technology with project type (used in config commands for the package-managers). Docker is not present, as there is no docker-config command and, consequently, no docker.yaml file we need to operate on.
Functions ¶
func DetectTechnologiesDescriptors ¶
func DetectTechnologiesDescriptors(path string, recursive bool, requestedTechs []string, requestedDescriptors map[Technology][]string, excludePathPattern string) (technologiesDetected map[Technology]map[string][]string, err error)
If recursive is true, the search will not be limited to files in the root path. If requestedTechs is empty, all technologies will be checked. If excludePathPattern is not empty, files/directories that match the wildcard pattern will be excluded from the search.
func DetectedTechnologiesList ¶
func DetectedTechnologiesList() (technologies []string)
func DetectedTechnologiesToSlice ¶
func DetectedTechnologiesToSlice(detected map[Technology]map[string][]string) []string
DetectedTechnologiesToSlice returns a string slice that includes all the names of the detected technologies.
Types ¶
type CodeLanguage ¶
type CodeLanguage string
const ( JavaScript CodeLanguage = "javascript" Python CodeLanguage = "python" GoLang CodeLanguage = "go" Java CodeLanguage = "java" CSharp CodeLanguage = "C#" CPP CodeLanguage = "C++" )
func TechnologyToLanguage ¶
func TechnologyToLanguage(technology Technology) CodeLanguage
type ContentValidator ¶
Given a file content, returns true if the content is an indicator of the technology.
type Technology ¶
type Technology string
const ( Maven Technology = "maven" Gradle Technology = "gradle" Npm Technology = "npm" Pnpm Technology = "pnpm" Yarn Technology = "yarn" Go Technology = "go" Pip Technology = "pip" Pipenv Technology = "pipenv" Poetry Technology = "poetry" Nuget Technology = "nuget" Dotnet Technology = "dotnet" Docker Technology = "docker" Oci Technology = "oci" Conan Technology = "conan" )
func GetAllTechnologiesList ¶
func GetAllTechnologiesList() (technologies []Technology)
func ToTechnologies ¶
func ToTechnologies(args []string) (technologies []Technology)
func (Technology) GetExecCommandName ¶
func (tech Technology) GetExecCommandName() string
func (Technology) GetPackageDescriptor ¶
func (tech Technology) GetPackageDescriptor() []string
func (Technology) GetPackageInstallationCommand ¶
func (tech Technology) GetPackageInstallationCommand() string
func (Technology) GetPackageType ¶
func (tech Technology) GetPackageType() string
func (Technology) GetPackageVersionOperator ¶
func (tech Technology) GetPackageVersionOperator() string
func (Technology) String ¶
func (tech Technology) String() string
func (Technology) ToFormal ¶
func (tech Technology) ToFormal() string
Click to show internal directories.
Click to hide internal directories.