MCPcopy Create free account

hub / github.com/defer-panic/news-feed-bot / functions

Functions70 in github.com/defer-panic/news-feed-bot

↓ 15 callersFunctionGet
()
internal/config/config.go:29
↓ 5 callersMethodAdd
(ctx context.Context, source model.Source)
internal/bot/view_cmd_addsource.go:14
↓ 5 callersFunctionAdminsOnly
(channelID int64, next botkit.ViewFunc)
internal/bot/middleware/admins_only.go:11
↓ 5 callersFunctionEscapeForMarkdown
(src string)
internal/botkit/markup/markdown.go:46
↓ 5 callersMethodFetch
(ctx context.Context)
internal/fetcher/fetcher.go:30
↓ 5 callersMethodRegisterCmdView
(cmd string, view ViewFunc)
internal/botkit/bot.go:21
↓ 3 callersMethodName
()
internal/fetcher/fetcher.go:29
↓ 3 callersFunctionNew
( articleStorage ArticleStorage, sourcesProvider SourcesProvider, fetchInterval time.Duration, filterKeywo
internal/fetcher/fetcher.go:41
↓ 3 callersMethodRun
(ctx context.Context)
internal/botkit/bot.go:29
↓ 3 callersFunctionparseDate
(t *testing.T, dateStr string)
internal/source/rss_test.go:61
↓ 2 callersMethodFetch
(ctx context.Context)
internal/fetcher/fetcher.go:75
↓ 2 callersMethodSelectAndSendArticle
(ctx context.Context)
internal/notifier/notifier.go:76
↓ 2 callersMethodStart
(ctx context.Context)
internal/fetcher/fetcher.go:55
↓ 2 callersFunctionformatSource
(source model.Source)
internal/bot/view_cmd_getsource.go:44
↓ 2 callersFunctionsetupFeedSever
(feed []byte)
internal/fetcher/fetcher_test.go:82
↓ 1 callersMethodAllNotPosted
(ctx context.Context, since time.Time, limit uint64)
internal/notifier/notifier.go:21
↓ 1 callersMethodDelete
(ctx context.Context, sourceID int64)
internal/bot/view_cmd_deletesource.go:13
↓ 1 callersMethodID
()
internal/fetcher/fetcher.go:28
↓ 1 callersMethodMarkAsPosted
(ctx context.Context, article model.Article)
internal/notifier/notifier.go:22
↓ 1 callersFunctionNew
(api *tgbotapi.BotAPI)
internal/botkit/bot.go:17
↓ 1 callersFunctionNew
( articleProvider ArticleProvider, summarizer Summarizer, bot *tgbotapi.BotAPI, sendInterval time.Duration
internal/notifier/notifier.go:38
↓ 1 callersFunctionNewArticleStorage
(db *sqlx.DB)
internal/storage/article.go:18
↓ 1 callersFunctionNewOpenAISummarizer
(apiKey, model, prompt string)
internal/summary/openai.go:23
↓ 1 callersFunctionNewSourceStorage
(db *sqlx.DB)
internal/storage/source.go:17
↓ 1 callersMethodSetPriority
(ctx context.Context, sourceID int64, priority int)
internal/bot/view_cmd_setpriority.go:12
↓ 1 callersMethodSourceByID
(ctx context.Context, id int64)
internal/bot/view_cmd_getsource.go:16
↓ 1 callersMethodSources
(ctx context.Context)
internal/fetcher/fetcher.go:23
↓ 1 callersMethodSources
(ctx context.Context)
internal/bot/view_cmd_listsources.go:17
↓ 1 callersMethodStore
(ctx context.Context, article model.Article)
internal/fetcher/fetcher.go:18
↓ 1 callersMethodSummarize
(text string)
internal/notifier/notifier.go:26
↓ 1 callersFunctionViewCmdAddSource
(storage SourceStorage)
internal/bot/view_cmd_addsource.go:17
↓ 1 callersFunctionViewCmdDeleteSource
(deleter SourceDeleter)
internal/bot/view_cmd_deletesource.go:16
↓ 1 callersFunctionViewCmdGetSource
(provider SourceProvider)
internal/bot/view_cmd_getsource.go:19
↓ 1 callersFunctionViewCmdListSource
(lister SourceLister)
internal/bot/view_cmd_listsources.go:20
↓ 1 callersFunctionViewCmdSetPriority
(prioritySetter PrioritySetter)
internal/bot/view_cmd_setpriority.go:15
↓ 1 callersFunctioncleanupText
(text string)
internal/notifier/notifier.go:130
↓ 1 callersMethodextractSummary
(article model.Article)
internal/notifier/notifier.go:102
↓ 1 callersMethodhandleUpdate
(ctx context.Context, update tgbotapi.Update)
internal/botkit/bot.go:47
↓ 1 callersMethoditemShouldBeSkipped
(item model.Item)
internal/fetcher/fetcher.go:130
↓ 1 callersMethodloadFeed
(ctx context.Context, url string)
internal/source/rss.go:53
↓ 1 callersMethodprocessItems
(ctx context.Context, source Source, items []model.Item)
internal/fetcher/fetcher.go:107
↓ 1 callersMethodsendArticle
(article model.Article, summary string)
internal/notifier/notifier.go:134
MethodAdd
(ctx context.Context, source model.Source)
internal/storage/source.go:51
MethodAllNotPosted
(ctx context.Context, since time.Time, limit uint64)
internal/storage/article.go:46
MethodDelete
(ctx context.Context, id int64)
internal/storage/source.go:90
MethodFetch
Fetch calls FetchFunc.
internal/fetcher/mocks/mock_source.go:68
MethodFetch
(ctx context.Context)
internal/source/rss.go:27
MethodFetchCalls
FetchCalls gets all the calls that were made to Fetch. Check the length with: len(mockedSource.FetchCalls())
internal/fetcher/mocks/mock_source.go:87
MethodID
ID calls IDFunc.
internal/fetcher/mocks/mock_source.go:100
MethodID
()
internal/source/rss.go:45
MethodIDCalls
IDCalls gets all the calls that were made to ID. Check the length with: len(mockedSource.IDCalls())
internal/fetcher/mocks/mock_source.go:116
MethodMarkAsPosted
(ctx context.Context, article model.Article)
internal/storage/article.go:91
MethodName
Name calls NameFunc.
internal/fetcher/mocks/mock_source.go:127
MethodName
()
internal/source/rss.go:49
MethodNameCalls
NameCalls gets all the calls that were made to Name. Check the length with: len(mockedSource.NameCalls())
internal/fetcher/mocks/mock_source.go:143
FunctionNewRSSSourceFromModel
(m model.Source)
internal/source/rss.go:19
FunctionParseJSON
(src string)
internal/botkit/args.go:7
MethodSetPriority
(ctx context.Context, id int64, priority int)
internal/storage/source.go:78
MethodSourceByID
(ctx context.Context, id int64)
internal/storage/source.go:36
MethodSources
Sources calls SourcesFunc.
internal/fetcher/mocks/mock_sources_provider.go:48
MethodSources
(ctx context.Context)
internal/storage/source.go:21
MethodSourcesCalls
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
MethodStart
(ctx context.Context)
internal/notifier/notifier.go:56
MethodStore
Store calls StoreFunc.
internal/fetcher/mocks/mock_article_storage.go:50
MethodStore
(ctx context.Context, article model.Article)
internal/storage/article.go:22
MethodStoreCalls
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
MethodSummarize
(text string)
internal/summary/openai.go:39
FunctionTestFetcher_Fetch
(t *testing.T)
internal/fetcher/fetcher_test.go:24
FunctionTestRSSSource_Fetch
(t *testing.T)
internal/source/rss_test.go:21
Functionmain
()
cmd/main.go:26