Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/defer-panic/news-feed-bot
/ functions
Functions
70 in github.com/defer-panic/news-feed-bot
⨍
Functions
70
◇
Types & classes
29
↓ 15 callers
Function
Get
()
internal/config/config.go:29
↓ 5 callers
Method
Add
(ctx context.Context, source model.Source)
internal/bot/view_cmd_addsource.go:14
↓ 5 callers
Function
AdminsOnly
(channelID int64, next botkit.ViewFunc)
internal/bot/middleware/admins_only.go:11
↓ 5 callers
Function
EscapeForMarkdown
(src string)
internal/botkit/markup/markdown.go:46
↓ 5 callers
Method
Fetch
(ctx context.Context)
internal/fetcher/fetcher.go:30
↓ 5 callers
Method
RegisterCmdView
(cmd string, view ViewFunc)
internal/botkit/bot.go:21
↓ 3 callers
Method
Name
()
internal/fetcher/fetcher.go:29
↓ 3 callers
Function
New
( articleStorage ArticleStorage, sourcesProvider SourcesProvider, fetchInterval time.Duration, filterKeywo
internal/fetcher/fetcher.go:41
↓ 3 callers
Method
Run
(ctx context.Context)
internal/botkit/bot.go:29
↓ 3 callers
Function
parseDate
(t *testing.T, dateStr string)
internal/source/rss_test.go:61
↓ 2 callers
Method
Fetch
(ctx context.Context)
internal/fetcher/fetcher.go:75
↓ 2 callers
Method
SelectAndSendArticle
(ctx context.Context)
internal/notifier/notifier.go:76
↓ 2 callers
Method
Start
(ctx context.Context)
internal/fetcher/fetcher.go:55
↓ 2 callers
Function
formatSource
(source model.Source)
internal/bot/view_cmd_getsource.go:44
↓ 2 callers
Function
setupFeedSever
(feed []byte)
internal/fetcher/fetcher_test.go:82
↓ 1 callers
Method
AllNotPosted
(ctx context.Context, since time.Time, limit uint64)
internal/notifier/notifier.go:21
↓ 1 callers
Method
Delete
(ctx context.Context, sourceID int64)
internal/bot/view_cmd_deletesource.go:13
↓ 1 callers
Method
ID
()
internal/fetcher/fetcher.go:28
↓ 1 callers
Method
MarkAsPosted
(ctx context.Context, article model.Article)
internal/notifier/notifier.go:22
↓ 1 callers
Function
New
(api *tgbotapi.BotAPI)
internal/botkit/bot.go:17
↓ 1 callers
Function
New
( articleProvider ArticleProvider, summarizer Summarizer, bot *tgbotapi.BotAPI, sendInterval time.Duration
internal/notifier/notifier.go:38
↓ 1 callers
Function
NewArticleStorage
(db *sqlx.DB)
internal/storage/article.go:18
↓ 1 callers
Function
NewOpenAISummarizer
(apiKey, model, prompt string)
internal/summary/openai.go:23
↓ 1 callers
Function
NewSourceStorage
(db *sqlx.DB)
internal/storage/source.go:17
↓ 1 callers
Method
SetPriority
(ctx context.Context, sourceID int64, priority int)
internal/bot/view_cmd_setpriority.go:12
↓ 1 callers
Method
SourceByID
(ctx context.Context, id int64)
internal/bot/view_cmd_getsource.go:16
↓ 1 callers
Method
Sources
(ctx context.Context)
internal/fetcher/fetcher.go:23
↓ 1 callers
Method
Sources
(ctx context.Context)
internal/bot/view_cmd_listsources.go:17
↓ 1 callers
Method
Store
(ctx context.Context, article model.Article)
internal/fetcher/fetcher.go:18
↓ 1 callers
Method
Summarize
(text string)
internal/notifier/notifier.go:26
↓ 1 callers
Function
ViewCmdAddSource
(storage SourceStorage)
internal/bot/view_cmd_addsource.go:17
↓ 1 callers
Function
ViewCmdDeleteSource
(deleter SourceDeleter)
internal/bot/view_cmd_deletesource.go:16
↓ 1 callers
Function
ViewCmdGetSource
(provider SourceProvider)
internal/bot/view_cmd_getsource.go:19
↓ 1 callers
Function
ViewCmdListSource
(lister SourceLister)
internal/bot/view_cmd_listsources.go:20
↓ 1 callers
Function
ViewCmdSetPriority
(prioritySetter PrioritySetter)
internal/bot/view_cmd_setpriority.go:15
↓ 1 callers
Function
cleanupText
(text string)
internal/notifier/notifier.go:130
↓ 1 callers
Method
extractSummary
(article model.Article)
internal/notifier/notifier.go:102
↓ 1 callers
Method
handleUpdate
(ctx context.Context, update tgbotapi.Update)
internal/botkit/bot.go:47
↓ 1 callers
Method
itemShouldBeSkipped
(item model.Item)
internal/fetcher/fetcher.go:130
↓ 1 callers
Method
loadFeed
(ctx context.Context, url string)
internal/source/rss.go:53
↓ 1 callers
Method
processItems
(ctx context.Context, source Source, items []model.Item)
internal/fetcher/fetcher.go:107
↓ 1 callers
Method
sendArticle
(article model.Article, summary string)
internal/notifier/notifier.go:134
Method
Add
(ctx context.Context, source model.Source)
internal/storage/source.go:51
Method
AllNotPosted
(ctx context.Context, since time.Time, limit uint64)
internal/storage/article.go:46
Method
Delete
(ctx context.Context, id int64)
internal/storage/source.go:90
Method
Fetch
Fetch calls FetchFunc.
internal/fetcher/mocks/mock_source.go:68
Method
Fetch
(ctx context.Context)
internal/source/rss.go:27
Method
FetchCalls
FetchCalls gets all the calls that were made to Fetch. Check the length with: len(mockedSource.FetchCalls())
internal/fetcher/mocks/mock_source.go:87
Method
ID
ID calls IDFunc.
internal/fetcher/mocks/mock_source.go:100
Method
ID
()
internal/source/rss.go:45
Method
IDCalls
IDCalls gets all the calls that were made to ID. Check the length with: len(mockedSource.IDCalls())
internal/fetcher/mocks/mock_source.go:116
Method
MarkAsPosted
(ctx context.Context, article model.Article)
internal/storage/article.go:91
Method
Name
Name calls NameFunc.
internal/fetcher/mocks/mock_source.go:127
Method
Name
()
internal/source/rss.go:49
Method
NameCalls
NameCalls gets all the calls that were made to Name. Check the length with: len(mockedSource.NameCalls())
internal/fetcher/mocks/mock_source.go:143
Function
NewRSSSourceFromModel
(m model.Source)
internal/source/rss.go:19
Function
ParseJSON
(src string)
internal/botkit/args.go:7
Method
SetPriority
(ctx context.Context, id int64, priority int)
internal/storage/source.go:78
Method
SourceByID
(ctx context.Context, id int64)
internal/storage/source.go:36
Method
Sources
Sources calls SourcesFunc.
internal/fetcher/mocks/mock_sources_provider.go:48
Method
Sources
(ctx context.Context)
internal/storage/source.go:21
Method
SourcesCalls
SourcesCalls gets all the calls that were made to Sources. Check the length with: len(mockedSourcesProvider.SourcesCalls())
internal/fetcher/mocks/mock_sources_provider.go:67
Method
Start
(ctx context.Context)
internal/notifier/notifier.go:56
Method
Store
Store calls StoreFunc.
internal/fetcher/mocks/mock_article_storage.go:50
Method
Store
(ctx context.Context, article model.Article)
internal/storage/article.go:22
Method
StoreCalls
StoreCalls gets all the calls that were made to Store. Check the length with: len(mockedArticleStorage.StoreCalls())
internal/fetcher/mocks/mock_article_storage.go:71
Method
Summarize
(text string)
internal/summary/openai.go:39
Function
TestFetcher_Fetch
(t *testing.T)
internal/fetcher/fetcher_test.go:24
Function
TestRSSSource_Fetch
(t *testing.T)
internal/source/rss_test.go:21
Function
main
()
cmd/main.go:26