Documentation
¶
Index ¶
- Constants
- func DefaultIDEAdapters() ([]typ.IDEAdapter, error)
- func RegisterRoutes(router *swagger.RouteGroup, handler *Handler)
- type AddSkillLocationRequest
- type AddSkillLocationResponse
- type DiscoverIdesResponse
- type Handler
- func (h *Handler) AddSkillLocation(c *gin.Context)
- func (h *Handler) DiscoverIdes(c *gin.Context)
- func (h *Handler) GetSkillContent(c *gin.Context)
- func (h *Handler) GetSkillLocation(c *gin.Context)
- func (h *Handler) GetSkillLocations(c *gin.Context)
- func (h *Handler) ImportSkillLocations(c *gin.Context)
- func (h *Handler) RefreshSkillLocation(c *gin.Context)
- func (h *Handler) RemoveSkillLocation(c *gin.Context)
- func (h *Handler) ScanIdes(c *gin.Context)
- type ImportSkillLocationsRequest
- type ImportSkillLocationsResponse
- type RefreshSkillLocationResponse
- type RemoveSkillLocationResponse
- type ScanIdesResponse
- type SkillContentResponse
- type SkillLocationResponse
- type SkillLocationsResponse
- type SkillManager
- func (sm *SkillManager) AddLocation(name, path string, ideSource typ.IDESource) (*typ.SkillLocation, error)
- func (sm *SkillManager) DiscoverIdes() (*typ.DiscoveryResult, error)
- func (sm *SkillManager) GetLocation(id string) (*typ.SkillLocation, error)
- func (sm *SkillManager) GetSkillContent(locationID, skillID, skillPath string) (*typ.Skill, error)
- func (sm *SkillManager) ListLocations() []typ.SkillLocation
- func (sm *SkillManager) RemoveLocation(id string) error
- func (sm *SkillManager) ScanIdes() (*typ.DiscoveryResult, error)
- func (sm *SkillManager) ScanLocation(locationID string) (*typ.ScanResult, error)
- func (sm *SkillManager) UpdateLocation(location typ.SkillLocation) error
- func (sm *SkillManager) UpdateLocationSkillCount(id string, count int) error
Constants ¶
const ( // SkillLocationsFile is the filename for skill locations storage SkillLocationsFile = "skill_locations.json" // SkillClientConfigFile is the filename for IDE client scanning configuration SkillClientConfigFile = "skill_client.json" )
Variables ¶
This section is empty.
Functions ¶
func DefaultIDEAdapters ¶
func DefaultIDEAdapters() ([]typ.IDEAdapter, error)
DefaultIDEAdapters returns the list of supported IDE adapters from embedded config
func RegisterRoutes ¶
func RegisterRoutes(router *swagger.RouteGroup, handler *Handler)
RegisterRoutes registers all skill management routes with swagger documentation
Types ¶
type AddSkillLocationRequest ¶
type AddSkillLocationRequest struct {
Name string `json:"name" binding:"required" description:"Display name for the location" example:"Claude Code Skills"`
Path string `` /* 127-byte string literal not displayed */
IDESource typ.IDESource `json:"ide_source" binding:"required" description:"IDE/source type" example:"claude_code"`
}
AddSkillLocationRequest represents the request to add a skill location
type AddSkillLocationResponse ¶
type AddSkillLocationResponse struct {
Success bool `json:"success" example:"true"`
Message string `json:"message" example:"Skill location added successfully"`
Data *typ.SkillLocation `json:"data,omitempty"`
}
AddSkillLocationResponse represents the response for adding a skill location
type DiscoverIdesResponse ¶
type DiscoverIdesResponse struct {
Success bool `json:"success" example:"true"`
Data *typ.DiscoveryResult `json:"data,omitempty"`
}
DiscoverIdesResponse represents the response for discovering IDEs
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles skill-related HTTP requests
func NewHandler ¶
func NewHandler(manager *SkillManager) *Handler
NewHandler creates a new skill handler
func (*Handler) AddSkillLocation ¶
AddSkillLocation adds a new skill location
func (*Handler) DiscoverIdes ¶
DiscoverIdes scans the home directory for installed IDEs with skills
func (*Handler) GetSkillContent ¶
GetSkillContent returns the content of a skill file
func (*Handler) GetSkillLocation ¶
GetSkillLocation retrieves a specific skill location
func (*Handler) GetSkillLocations ¶
GetSkillLocations returns all skill locations
func (*Handler) ImportSkillLocations ¶
ImportSkillLocations imports discovered skill locations
func (*Handler) RefreshSkillLocation ¶
RefreshSkillLocation scans a location for updated skill list
func (*Handler) RemoveSkillLocation ¶
RemoveSkillLocation removes a skill location
type ImportSkillLocationsRequest ¶
type ImportSkillLocationsRequest struct {
Locations []typ.SkillLocation `json:"locations" binding:"required" description:"Array of skill locations to import"`
}
ImportSkillLocationsRequest represents the request to import skill locations
type ImportSkillLocationsResponse ¶
type ImportSkillLocationsResponse struct {
Success bool `json:"success" example:"true"`
Message string `json:"message" example:"Imported 5 skill locations"`
Data []typ.SkillLocation `json:"data,omitempty"`
}
ImportSkillLocationsResponse represents the response for importing skill locations
type RefreshSkillLocationResponse ¶
type RefreshSkillLocationResponse struct {
Success bool `json:"success" example:"true"`
Message string `json:"message" example:"Skill location refreshed successfully"`
Data *typ.ScanResult `json:"data,omitempty"`
}
RefreshSkillLocationResponse represents the response for refreshing a skill location
type RemoveSkillLocationResponse ¶
type RemoveSkillLocationResponse struct {
Success bool `json:"success" example:"true"`
Message string `json:"message" example:"Skill location removed successfully"`
}
RemoveSkillLocationResponse represents the response for removing a skill location
type ScanIdesResponse ¶
type ScanIdesResponse struct {
Success bool `json:"success" example:"true"`
Data *typ.DiscoveryResult `json:"data,omitempty"`
}
ScanIdesResponse represents the response for scanning all IDEs
type SkillContentResponse ¶
type SkillContentResponse struct {
Success bool `json:"success" example:"true"`
Data *typ.Skill `json:"data,omitempty"`
}
SkillContentResponse represents the response for getting skill content
type SkillLocationResponse ¶
type SkillLocationResponse struct {
Success bool `json:"success" example:"true"`
Data *typ.SkillLocation `json:"data,omitempty"`
}
SkillLocationResponse represents the response for getting a skill location
type SkillLocationsResponse ¶
type SkillLocationsResponse struct {
Success bool `json:"success" example:"true"`
Data []typ.SkillLocation `json:"data"`
}
SkillLocationsResponse represents the response for listing skill locations
type SkillManager ¶
type SkillManager struct {
// contains filtered or unexported fields
}
SkillManager manages skill locations
func NewSkillManager ¶
func NewSkillManager(configDir string) (*SkillManager, error)
NewSkillManager creates a new skill manager
func (*SkillManager) AddLocation ¶
func (sm *SkillManager) AddLocation(name, path string, ideSource typ.IDESource) (*typ.SkillLocation, error)
AddLocation adds a new skill location
func (*SkillManager) DiscoverIdes ¶
func (sm *SkillManager) DiscoverIdes() (*typ.DiscoveryResult, error)
DiscoverIdes scans the home directory for installed IDEs with skills
func (*SkillManager) GetLocation ¶
func (sm *SkillManager) GetLocation(id string) (*typ.SkillLocation, error)
GetLocation retrieves a skill location by ID
func (*SkillManager) GetSkillContent ¶
func (sm *SkillManager) GetSkillContent(locationID, skillID, skillPath string) (*typ.Skill, error)
GetSkillContent reads and returns the content of a skill file
func (*SkillManager) ListLocations ¶
func (sm *SkillManager) ListLocations() []typ.SkillLocation
ListLocations returns all skill locations
func (*SkillManager) RemoveLocation ¶
func (sm *SkillManager) RemoveLocation(id string) error
RemoveLocation removes a skill location by ID
func (*SkillManager) ScanIdes ¶
func (sm *SkillManager) ScanIdes() (*typ.DiscoveryResult, error)
ScanIdes scans all IDE locations and returns discovered skills This is a comprehensive scan that checks all configured IDE locations
func (*SkillManager) ScanLocation ¶
func (sm *SkillManager) ScanLocation(locationID string) (*typ.ScanResult, error)
ScanLocation scans a location directory for skill files
func (*SkillManager) UpdateLocation ¶
func (sm *SkillManager) UpdateLocation(location typ.SkillLocation) error
UpdateLocation updates a skill location
func (*SkillManager) UpdateLocationSkillCount ¶
func (sm *SkillManager) UpdateLocationSkillCount(id string, count int) error
UpdateLocationSkillCount updates the skill count for a location