mytest

package
v0.0.0-...-9f93016 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakeArticle

func FakeArticle(
	suffix uint,
	tags []string,
	authors []dbmod.Author,
	published uint64,
	modified uint64,
	attachments []dbmod.Attachment,
) dbmod.Article

func FakeAttachments

func FakeAttachments(num uint) []dbmod.Attachment

func FakeAuthors

func FakeAuthors(names []string) []dbmod.Author

func FakeFeed

func FakeFeed(suffix uint, tags []string, articles []dbmod.Article) dbmod.Feed

func FakePattern

func FakePattern(suffix uint, pattern string, tags []string) dbmod.Pattern

func FakeTagger

func FakeTagger(feed dbmod.Feed, patterns []dbmod.Pattern) (dbmod.Feed, error)

func GetFeedErrStub

func GetFeedErrStub(url string) (dbmod.Feed, error)

func GetFeedStub

func GetFeedStub(url string) (dbmod.Feed, error)

func GetFeedUrlsErrStub

func GetFeedUrlsErrStub(db *gorm.DB) ([]string, error)

func GetFeedUrlsStub

func GetFeedUrlsStub(db *gorm.DB) ([]string, error)

func GetPatternsErrStub

func GetPatternsErrStub(db *gorm.DB) ([]dbmod.Pattern, error)

func GetPatternsStub

func GetPatternsStub(db *gorm.DB) ([]dbmod.Pattern, error)

func OnDbErrStub

func OnDbErrStub(err error) *zerolog.Event

func OnFetchErrStub

func OnFetchErrStub(url string, err error)

func OpenDB

func OpenDB() *gorm.DB

func TagErrStub

func TagErrStub(feed dbmod.Feed, patterns []dbmod.Pattern) (dbmod.Feed, error)

func TagStub

func TagStub(feed dbmod.Feed, patterns []dbmod.Pattern) (dbmod.Feed, error)

func TagsStub

func TagsStub() []string

func UpdateFeedStub

func UpdateFeedStub(db *gorm.DB, feed dbmod.Feed) error

Types

type StubData

type StubData struct {
	URLs        []string
	Articles    []dbmod.Article
	Feed        dbmod.Feed
	FeedTags    []dbmod.Tag
	ArticleTags []dbmod.Tag
	Patterns    []dbmod.Pattern
}

func GetStubData

func GetStubData() StubData

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL