Documentation
¶
Index ¶
- type BatchCreateSourcesInput
- type BatchCreateSourcesResult
- type BatchDeleteContentsInput
- type BatchDeleteContentsResult
- type BatchDeleteSourcesInput
- type BatchDeleteSourcesResult
- type BatchError
- type CreateRecommendationFeedbackInput
- type CreateSourceInput
- type FetchJob
- type GetRecommendationsInput
- type RSSContent
- type RSSSource
- type RecommendationFeedback
- type RecommendationResult
- type SQLiteDB
- func (s *SQLiteDB) BatchCreateSources(input BatchCreateSourcesInput) (*BatchCreateSourcesResult, error)
- func (s *SQLiteDB) BatchDeleteContents(input BatchDeleteContentsInput) (*BatchDeleteContentsResult, error)
- func (s *SQLiteDB) BatchDeleteSources(input BatchDeleteSourcesInput) (*BatchDeleteSourcesResult, error)
- func (s *SQLiteDB) Close() error
- func (s *SQLiteDB) CreateContent(content *RSSContent) error
- func (s *SQLiteDB) CreateFetchJob(sourceID *string, days int) (*FetchJob, error)
- func (s *SQLiteDB) CreateRecommendationFeedback(input CreateRecommendationFeedbackInput) (*RecommendationFeedback, error)
- func (s *SQLiteDB) CreateSource(input CreateSourceInput) (*RSSSource, error)
- func (s *SQLiteDB) DeleteContent(id string) error
- func (s *SQLiteDB) DeleteSource(id string) error
- func (s *SQLiteDB) GetContent(id string) (*RSSContent, error)
- func (s *SQLiteDB) GetContentByURL(url string) (*RSSContent, error)
- func (s *SQLiteDB) GetFetchJob(id string) (*FetchJob, error)
- func (s *SQLiteDB) GetRecommendations(input GetRecommendationsInput) ([]RecommendationResult, error)
- func (s *SQLiteDB) GetSource(id string) (*RSSSource, error)
- func (s *SQLiteDB) GetUserFeedback(userID string) ([]RecommendationFeedback, error)
- func (s *SQLiteDB) ListContents(sourceID string, startDate, endDate time.Time, limit int, nextToken string) ([]RSSContent, string, error)
- func (s *SQLiteDB) ListSources(limit int, nextToken string) ([]RSSSource, string, error)
- func (s *SQLiteDB) SearchContents(keywords string, sourceID string, limit int) ([]RSSContent, error)
- func (s *SQLiteDB) UpdateContent(id string, input UpdateContentInput) (*RSSContent, error)
- func (s *SQLiteDB) UpdateFetchJobStatus(id string, status string, itemsProcessed int, errorMsg string) error
- func (s *SQLiteDB) UpdateSource(id string, input UpdateSourceInput) (*RSSSource, error)
- func (s *SQLiteDB) UpdateSourceLastFetchedAt(id string, lastFetchedAt time.Time) error
- type UpdateContentInput
- type UpdateSourceInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchCreateSourcesInput ¶
type BatchCreateSourcesInput struct {
Sources []CreateSourceInput `json:"sources"`
}
BatchCreateSourcesInput represents the input for batch creating RSS sources
type BatchCreateSourcesResult ¶
type BatchCreateSourcesResult struct {
Sources []RSSSource `json:"sources"`
Errors []BatchError `json:"errors"`
}
BatchCreateSourcesResult represents the result of batch creating RSS sources
type BatchDeleteContentsInput ¶
type BatchDeleteContentsInput struct {
ContentIDs []string `json:"contentIds"`
}
BatchDeleteContentsInput represents the input for batch deleting RSS content items
type BatchDeleteContentsResult ¶
type BatchDeleteContentsResult struct {
DeletedCount int `json:"deletedCount"`
Errors []BatchError `json:"errors"`
}
BatchDeleteContentsResult represents the result of batch deleting RSS content items
type BatchDeleteSourcesInput ¶
type BatchDeleteSourcesInput struct {
SourceIDs []string `json:"sourceIds"`
}
BatchDeleteSourcesInput represents the input for batch deleting RSS sources
type BatchDeleteSourcesResult ¶
type BatchDeleteSourcesResult struct {
DeletedCount int `json:"deletedCount"`
Errors []BatchError `json:"errors"`
}
BatchDeleteSourcesResult represents the result of batch deleting RSS sources
type BatchError ¶
type BatchError struct {
Index int `json:"index,omitempty"`
SourceID string `json:"sourceId,omitempty"`
ErrorType string `json:"errorType"`
Message string `json:"message"`
}
BatchError represents an error in a batch operation
type CreateRecommendationFeedbackInput ¶
type CreateRecommendationFeedbackInput struct {
ContentID string `json:"contentId"`
UserID string `json:"userId"`
Rating int `json:"rating"`
Comment string `json:"comment,omitempty"`
}
CreateRecommendationFeedbackInput represents the input for creating recommendation feedback
type CreateSourceInput ¶
type CreateSourceInput struct {
Name string `json:"name"`
URL string `json:"url"`
Description string `json:"description"`
}
CreateSourceInput represents the input for creating an RSS source
type FetchJob ¶
type FetchJob struct {
ID string `json:"jobId"`
Status string `json:"status"`
StartedAt time.Time `json:"startedAt"`
CompletedAt *time.Time `json:"completedAt,omitempty"`
ItemsProcessed int `json:"itemsProcessed"`
SourceID *string `json:"sourceId,omitempty"`
Days int `json:"days"`
Errors []string `json:"errors,omitempty"`
}
FetchJob represents an RSS content fetch job
type GetRecommendationsInput ¶
type GetRecommendationsInput struct {
UserID string `json:"userId,omitempty"`
SourceIDs []string `json:"sourceIds,omitempty"`
Limit int `json:"limit"`
}
GetRecommendationsInput represents the input for getting recommendations
type RSSContent ¶
type RSSContent struct {
ID string `json:"id"`
SourceID string `json:"sourceId"`
Title string `json:"title"`
Link string `json:"link"`
Description string `json:"description"`
Content string `json:"content,omitempty"`
PublishedAt time.Time `json:"publishedAt"`
FetchedAt time.Time `json:"fetchedAt"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
Author string `json:"author,omitempty"`
Categories []string `json:"categories,omitempty"`
}
RSSContent represents an RSS content item
type RSSSource ¶
type RSSSource struct {
ID string `json:"id"`
Name string `json:"name"`
URL string `json:"url"`
Description string `json:"description"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
LastFetchedAt *time.Time `json:"lastFetchedAt,omitempty"`
}
RSSSource represents an RSS source
type RecommendationFeedback ¶
type RecommendationFeedback struct {
ID string `json:"id"`
ContentID string `json:"contentId"`
UserID string `json:"userId"`
Rating int `json:"rating"` // 1-5 scale
Timestamp time.Time `json:"timestamp"`
Comment string `json:"comment,omitempty"`
}
RecommendationFeedback represents user feedback on a recommended content item
type RecommendationResult ¶
type RecommendationResult struct {
Content RSSContent `json:"content"`
Score float64 `json:"score"`
RecommendFor string `json:"recommendFor,omitempty"`
}
RecommendationResult represents a recommended content item with its score
type SQLiteDB ¶
type SQLiteDB struct {
// contains filtered or unexported fields
}
SQLiteDB represents a SQLite database connection
func NewSQLiteDB ¶
NewSQLiteDB creates a new SQLite database connection
func (*SQLiteDB) BatchCreateSources ¶
func (s *SQLiteDB) BatchCreateSources(input BatchCreateSourcesInput) (*BatchCreateSourcesResult, error)
BatchCreateSources creates multiple RSS sources
func (*SQLiteDB) BatchDeleteContents ¶
func (s *SQLiteDB) BatchDeleteContents(input BatchDeleteContentsInput) (*BatchDeleteContentsResult, error)
BatchDeleteContents deletes multiple RSS content items
func (*SQLiteDB) BatchDeleteSources ¶
func (s *SQLiteDB) BatchDeleteSources(input BatchDeleteSourcesInput) (*BatchDeleteSourcesResult, error)
BatchDeleteSources deletes multiple RSS sources
func (*SQLiteDB) CreateContent ¶
func (s *SQLiteDB) CreateContent(content *RSSContent) error
CreateContent creates a new RSS content item
func (*SQLiteDB) CreateFetchJob ¶
CreateFetchJob creates a new fetch job
func (*SQLiteDB) CreateRecommendationFeedback ¶
func (s *SQLiteDB) CreateRecommendationFeedback(input CreateRecommendationFeedbackInput) (*RecommendationFeedback, error)
CreateRecommendationFeedback creates a new recommendation feedback entry
func (*SQLiteDB) CreateSource ¶
func (s *SQLiteDB) CreateSource(input CreateSourceInput) (*RSSSource, error)
CreateSource creates a new RSS source
func (*SQLiteDB) DeleteContent ¶
DeleteContent deletes an RSS content item
func (*SQLiteDB) DeleteSource ¶
DeleteSource deletes an RSS source
func (*SQLiteDB) GetContent ¶
func (s *SQLiteDB) GetContent(id string) (*RSSContent, error)
GetContent retrieves an RSS content item by ID
func (*SQLiteDB) GetContentByURL ¶
func (s *SQLiteDB) GetContentByURL(url string) (*RSSContent, error)
GetContentByURL retrieves an RSS content item by URL
func (*SQLiteDB) GetFetchJob ¶
GetFetchJob retrieves a fetch job by ID
func (*SQLiteDB) GetRecommendations ¶
func (s *SQLiteDB) GetRecommendations(input GetRecommendationsInput) ([]RecommendationResult, error)
GetRecommendations retrieves recommended content items
func (*SQLiteDB) GetUserFeedback ¶
func (s *SQLiteDB) GetUserFeedback(userID string) ([]RecommendationFeedback, error)
GetUserFeedback retrieves all feedback given by a user
func (*SQLiteDB) ListContents ¶
func (s *SQLiteDB) ListContents(sourceID string, startDate, endDate time.Time, limit int, nextToken string) ([]RSSContent, string, error)
ListContents lists RSS content items with filtering and pagination
func (*SQLiteDB) ListSources ¶
ListSources lists RSS sources with pagination
func (*SQLiteDB) SearchContents ¶
func (s *SQLiteDB) SearchContents(keywords string, sourceID string, limit int) ([]RSSContent, error)
SearchContents searches for RSS content items by keywords
func (*SQLiteDB) UpdateContent ¶
func (s *SQLiteDB) UpdateContent(id string, input UpdateContentInput) (*RSSContent, error)
UpdateContent updates an RSS content item
func (*SQLiteDB) UpdateFetchJobStatus ¶
func (s *SQLiteDB) UpdateFetchJobStatus(id string, status string, itemsProcessed int, errorMsg string) error
UpdateFetchJobStatus updates the status of a fetch job
func (*SQLiteDB) UpdateSource ¶
func (s *SQLiteDB) UpdateSource(id string, input UpdateSourceInput) (*RSSSource, error)
UpdateSource updates an RSS source
type UpdateContentInput ¶
type UpdateContentInput struct {
Title string `json:"title"`
Description string `json:"description"`
Content string `json:"content"`
Categories []string `json:"categories"`
}
UpdateContentInput represents the input for updating an RSS content item
type UpdateSourceInput ¶
type UpdateSourceInput struct {
Name string `json:"name"`
URL string `json:"url"`
Description string `json:"description"`
}
UpdateSourceInput represents the input for updating an RSS source