Documentation
¶
Index ¶
- type Category
- type CategoryInfo
- type CategoryStats
- type CommandClassifier
- func (cc *CommandClassifier) AnalyzeCategories(commands []string) map[Category]*CategoryStats
- func (cc *CommandClassifier) ClassifyCommand(command string) Category
- func (cc *CommandClassifier) GetAllCategories() map[Category]*CategoryInfo
- func (cc *CommandClassifier) GetCategoryInfo(category Category) *CategoryInfo
- func (cc *CommandClassifier) GetXPMultiplier(category Category) float64
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" 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
Click to show internal directories.
Click to hide internal directories.