Documentation
¶
Index ¶
- func Execute()
- func GroupTechsByCategory(allRules []types.Rule) map[string][]types.TechInfo
- func LoadRulesAndCategories() ([]types.Rule, map[string]types.CategoryDefinition)
- func Output(o Outputter, format string)
- func OutputToFile(o Outputter, format string, outputFile string)
- func SortCategories(categories []types.CategoryInfo)
- func SortTechs(technologies []types.TechInfo)
- type CategoriesResult
- type ComponentsResult
- type LanguageInfo
- type LanguagesResult
- type LanguagesSummary
- type Outputter
- type RuleOutput
- type RuleResult
- type TechTaxonomyCategory
- type TechTaxonomyResult
- type TechsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupTechsByCategory ¶
GroupTechsByCategory groups technologies by their categories
func LoadRulesAndCategories ¶
func LoadRulesAndCategories() ([]types.Rule, map[string]types.CategoryDefinition)
LoadRulesAndCategories loads both rules and categories config
func OutputToFile ¶
OutputToFile handles unified output for any Outputter with optional file output
func SortCategories ¶
func SortCategories(categories []types.CategoryInfo)
SortCategories sorts categories by name
Types ¶
type CategoriesResult ¶
type CategoriesResult struct {
Categories []types.CategoryInfo `json:"categories"`
Count int `json:"count"`
}
CategoriesResult is the output for the categories command
func (*CategoriesResult) ToJSON ¶
func (r *CategoriesResult) ToJSON() interface{}
func (*CategoriesResult) ToText ¶
func (r *CategoriesResult) ToText(w io.Writer)
type ComponentsResult ¶
type ComponentsResult struct {
ComponentCategories []string `json:"component_categories"`
NonComponentCategories []string `json:"non_component_categories"`
}
ComponentsResult is the output for the components flag
func (*ComponentsResult) ToJSON ¶
func (r *ComponentsResult) ToJSON() interface{}
func (*ComponentsResult) ToText ¶
func (r *ComponentsResult) ToText(w io.Writer)
type LanguageInfo ¶
type LanguageInfo struct {
Name string `json:"name"`
Type string `json:"type"`
Extensions []string `json:"extensions"`
}
LanguageInfo holds information about a language from go-enry
type LanguagesResult ¶
type LanguagesResult struct {
Languages []LanguageInfo `json:"languages"`
Summary LanguagesSummary `json:"summary"`
}
LanguagesResult is the output for the languages command
func (*LanguagesResult) ToJSON ¶
func (r *LanguagesResult) ToJSON() interface{}
func (*LanguagesResult) ToText ¶
func (r *LanguagesResult) ToText(w io.Writer)
type LanguagesSummary ¶
LanguagesSummary holds summary statistics
type Outputter ¶
type Outputter interface {
// ToJSON returns the data structure for JSON/YAML marshaling
ToJSON() interface{}
// ToText writes human-readable text format
ToText(w io.Writer)
}
Outputter interface for commands with structured output
type RuleOutput ¶
type RuleOutput struct {
Tech string `json:"tech"`
Name string `json:"name"`
Category string `json:"category"`
Files []string `json:"files,omitempty"`
Extensions []string `json:"extensions,omitempty"`
Content []types.ContentRule `json:"content,omitempty"`
Dependencies []types.Dependency `json:"dependencies,omitempty"`
Properties map[string]interface{} `json:"properties,omitempty"`
Description string `json:"description,omitempty"`
}
RuleOutput represents the output format for rule info
type RuleResult ¶
RuleResult wraps a rule for output
func (*RuleResult) ToJSON ¶
func (r *RuleResult) ToJSON() interface{}
func (*RuleResult) ToText ¶
func (r *RuleResult) ToText(w io.Writer)
type TechTaxonomyCategory ¶
type TechTaxonomyCategory struct {
Name string `json:"name"`
Description string `json:"description"`
IsComponent bool `json:"is_component"`
Technologies []types.TechInfo `json:"technologies"`
}
TechTaxonomyCategory represents a category with its technologies
type TechTaxonomyResult ¶
type TechTaxonomyResult struct {
Categories []TechTaxonomyCategory `json:"categories"`
Count int `json:"count"`
}
TechTaxonomyResult is the output for the tech-taxonomy command
func (*TechTaxonomyResult) ToJSON ¶
func (r *TechTaxonomyResult) ToJSON() interface{}
func (*TechTaxonomyResult) ToText ¶
func (r *TechTaxonomyResult) ToText(w io.Writer)
func (*TechTaxonomyResult) ToYAML ¶
func (r *TechTaxonomyResult) ToYAML() interface{}
type TechsResult ¶
TechsResult is the output for the techs command
func (*TechsResult) ToJSON ¶
func (r *TechsResult) ToJSON() interface{}
func (*TechsResult) ToText ¶
func (r *TechsResult) ToText(w io.Writer)