favorites

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package favorites provides favorite commands management

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FavoriteCommand

type FavoriteCommand struct {
	ID          string
	Name        string
	Command     string
	Description string
	Tags        []string
	UsageCount  int
	LastUsed    time.Time
	CreatedAt   time.Time
}

FavoriteCommand represents a favorite command

type FavoritesManager

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

FavoritesManager manages favorite commands

func NewFavoritesManager

func NewFavoritesManager() *FavoritesManager

NewFavoritesManager creates a new favorites manager

func (*FavoritesManager) AddFavorite

func (fm *FavoritesManager) AddFavorite(fav *FavoriteCommand) error

AddFavorite adds a favorite command

func (*FavoritesManager) GetByTag

func (fm *FavoritesManager) GetByTag(tag string) []*FavoriteCommand

GetByTag returns favorites with a specific tag

func (*FavoritesManager) GetFavorite

func (fm *FavoritesManager) GetFavorite(id string) (*FavoriteCommand, error)

GetFavorite returns a favorite by ID

func (*FavoritesManager) GetMostUsed

func (fm *FavoritesManager) GetMostUsed(count int) []*FavoriteCommand

GetMostUsed returns the most used favorites

func (*FavoritesManager) IncrementUsage

func (fm *FavoritesManager) IncrementUsage(id string)

IncrementUsage increments usage count

func (*FavoritesManager) ListFavorites

func (fm *FavoritesManager) ListFavorites() []*FavoriteCommand

ListFavorites returns all favorites

func (*FavoritesManager) RemoveFavorite

func (fm *FavoritesManager) RemoveFavorite(id string) error

RemoveFavorite removes a favorite command

Jump to

Keyboard shortcuts

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