knowledge

package
v0.1.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KnowledgeBase

type KnowledgeBase struct {
	Languages map[string]LanguagePackages `json:"languages"`
}

KnowledgeBase contains package information for all languages

func LoadFromFile

func LoadFromFile(root string) (*KnowledgeBase, error)

LoadFromFile loads the knowledge base from JSON

func (*KnowledgeBase) GetComponentPackage

func (kb *KnowledgeBase) GetComponentPackage(language, componentType, component string) string

GetComponentPackage returns the package for a component

func (*KnowledgeBase) GetCorePackages

func (kb *KnowledgeBase) GetCorePackages(language string) []string

GetCorePackages returns core packages for a language

func (*KnowledgeBase) GetInstrumentationPackage

func (kb *KnowledgeBase) GetInstrumentationPackage(language, instrumentation string) string

GetInstrumentationPackage returns the package for an instrumentation

func (*KnowledgeBase) GetPrerequisites

func (kb *KnowledgeBase) GetPrerequisites(language string) []PrerequisiteRule

GetPrerequisites returns prerequisite rules for a language

type LanguagePackages

type LanguagePackages struct {
	Core             []string                     `json:"core"`
	Instrumentations map[string]string            `json:"instrumentations"`
	Components       map[string]map[string]string `json:"components"`
	Prerequisites    []PrerequisiteRule           `json:"prerequisites"`
}

LanguagePackages defines packages for a language

type PrerequisiteRule

type PrerequisiteRule struct {
	If       []string `json:"if"`
	Requires []string `json:"requires"`
	Unless   []string `json:"unless"`
}

PrerequisiteRule defines instrumentation prerequisites

Jump to

Keyboard shortcuts

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