categories

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category string

Category represents a command category

const (
	Git         Category = "git"
	Development Category = "development"
	System      Category = "system"
	Navigation  Category = "navigation"
	Network     Category = "network"
	Docker      Category = "docker"
	Kubernetes  Category = "kubernetes"
	Cloud       Category = "cloud"
	Database    Category = "database"
	Package     Category = "package"
	Build       Category = "build"
	Test        Category = "test"
	Text        Category = "text"
	Archive     Category = "archive"
	Security    Category = "security"
	Monitoring  Category = "monitoring"
	Unknown     Category = "unknown"
)

type CategoryInfo

type CategoryInfo struct {
	Name        string  `json:"name"`
	Icon        string  `json:"icon"`
	Color       string  `json:"color"`
	Description string  `json:"description"`
	XPBonus     float64 `json:"xp_bonus"`
}

CategoryInfo holds category metadata

type CategoryStats

type CategoryStats struct {
	Category   Category `json:"category"`
	Count      int      `json:"count"`
	Percentage float64  `json:"percentage"`
	TotalXP    int      `json:"total_xp"`
	LastUsed   string   `json:"last_used"`
}

GetCategoryStats calculates statistics for each category

type CommandClassifier

type CommandClassifier struct {
	// contains filtered or unexported fields
}

CommandClassifier classifies commands into categories

func NewCommandClassifier

func NewCommandClassifier() *CommandClassifier

NewCommandClassifier creates a new command classifier

func (*CommandClassifier) AnalyzeCategories

func (cc *CommandClassifier) AnalyzeCategories(commands []string) map[Category]*CategoryStats

AnalyzeCategories analyzes command usage by category

func (*CommandClassifier) ClassifyCommand

func (cc *CommandClassifier) ClassifyCommand(command string) Category

ClassifyCommand determines the category of a command

func (*CommandClassifier) GetAllCategories

func (cc *CommandClassifier) GetAllCategories() map[Category]*CategoryInfo

GetAllCategories returns all available categories

func (*CommandClassifier) GetCategoryInfo

func (cc *CommandClassifier) GetCategoryInfo(category Category) *CategoryInfo

GetCategoryInfo returns metadata for a category

func (*CommandClassifier) GetXPMultiplier

func (cc *CommandClassifier) GetXPMultiplier(category Category) float64

GetXPMultiplier returns the XP multiplier for a category

Jump to

Keyboard shortcuts

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