generators

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const SlideShareUrlRegex = "https://www.slideshare.net/.*/.*"
View Source
const TweetUrlRegex = "https://twitter.com/.*/status/([0-9]+)"

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleFetcher added in v0.8.3

type ArticleFetcher interface {
	Fetch(url string) (string, string, error)
	IsFetchable(url string) bool
}

type ArticleFetcherMock added in v0.8.3

type ArticleFetcherMock struct {
	OnFetch       func(url string) (string, string, error)
	OnIsFetchable func(url string) bool
}

func (*ArticleFetcherMock) Fetch added in v0.8.3

func (m *ArticleFetcherMock) Fetch(url string) (string, string, error)

func (*ArticleFetcherMock) IsFetchable added in v0.8.3

func (m *ArticleFetcherMock) IsFetchable(url string) bool

type ArticleGenerator

type ArticleGenerator interface {
	NewArticle(url string, tags []string) (*models.Article, error)
	GetUniqueTitle(title string) (string, error)
}

func NewArticleGenerator added in v0.15.5

func NewArticleGenerator(articleDatastore datastore.ArticleDatastore) ArticleGenerator

Jump to

Keyboard shortcuts

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