languagemodels

package
v0.0.0-...-4dd3f74 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector interface {
	DetectLanguage(proc Process) (Language, error)
}

Detector is an interface for detecting the language of a process

type Language

type Language struct {
	Name    LanguageName
	Version string
}

Language contains metadata collected from the call to `DetectLanguage`

type LanguageName

type LanguageName string

LanguageName is a string enum that represents a detected language name.

const (
	//nolint:revive // TODO(PROC) Fix revive linter
	Go LanguageName = "go"
	//nolint:revive // TODO(PROC) Fix revive linter
	Node LanguageName = "node"
	//nolint:revive // TODO(PROC) Fix revive linter
	Dotnet LanguageName = "dotnet"
	//nolint:revive // TODO(PROC) Fix revive linter
	Python LanguageName = "python"
	//nolint:revive // TODO(PROC) Fix revive linter
	Java LanguageName = "java"
	//nolint:revive // TODO(PROC) Fix revive linter
	Ruby LanguageName = "ruby"
	//nolint:revive // TODO(PROC) Fix revive linter
	Unknown LanguageName = ""
)

type Process

type Process interface {
	GetPid() int32
	GetCommand() string
	GetCmdline() []string
}

Process is an interface that exposes the fields necessary to detect a language

Jump to

Keyboard shortcuts

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