Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StarsService ¶
type StarsService struct {
// contains filtered or unexported fields
}
StarsService implements ports.GitHubService for fetching GitHub repository stars.
func NewStarsService ¶
func NewStarsService(token string) *StarsService
NewStarsService creates a new StarsService. token is optional - if empty, uses unauthenticated API (60 req/h limit).
func (*StarsService) GetStars ¶
GetStars fetches the current star count for a GitHub repository. Uses cache if available and not expired (1 hour TTL). Returns 0 if the repository doesn't exist or on error (fail-safe).
func (*StarsService) StartCleanup ¶
func (s *StarsService) StartCleanup(ctx context.Context)
StartCleanup starts a background goroutine to periodically clean up expired cache entries.
Click to show internal directories.
Click to hide internal directories.