native

package
v0.3.35 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListNamespaces

func ListNamespaces(lekkoPath string, lang Language) (namespaces []string, err error)

func ListNativeConfigFiles

func ListNativeConfigFiles(lekkoPath string, lang Language) ([]string, error)

Types

type Framework added in v0.3.31

type Framework string
const (
	FwUnknown Framework = ""
	FwNode    Framework = "Node"
	FwReact   Framework = "React"
	FwVite    Framework = "Vite"
	FwNext    Framework = "Next.js"
)

type GoMetadata

type GoMetadata struct {
	ModulePath string
}

type Language added in v0.3.31

type Language string
const (
	LangUnknown    Language = ""
	LangGo         Language = "Go"
	LangTypeScript Language = "TypeScript"
)

func NativeLangFromExt

func NativeLangFromExt(filename string) (Language, error)

func (*Language) Ext added in v0.3.31

func (l *Language) Ext() string

func (*Language) GetNamespace added in v0.3.31

func (l *Language) GetNamespace(filename string) (string, error)

type Metadata

type Metadata interface {
	// contains filtered or unexported methods
}

type PackageManager added in v0.3.31

type PackageManager string
const (
	PmUnknown PackageManager = ""
	PmNPM     PackageManager = "npm"
	PmYarn    PackageManager = "yarn"
)

type Project added in v0.3.31

type Project struct {
	Language       Language
	PackageManager PackageManager
	// A project can have multiple "frameworks" - e.g. React and Vite
	Frameworks []Framework

	Metadata Metadata
}

Representation of detected information about a native lang code project

func DetectNativeLang

func DetectNativeLang(codeRepoPath string) (*Project, error)

Check files in a code project to detect native lang information

func (*Project) HasFramework added in v0.3.31

func (p *Project) HasFramework(fw Framework) bool

Jump to

Keyboard shortcuts

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