newsbot-api/services/common.go
James Tombleson 333a4f5345
Features/twitch (#7)
* ran go mod tity

* updated formatting and moved to using some common errors

* some common source errors

* bumped go version

* a bulk of the work has been completed to parse twitch videos/users

* Added twitch config values

* added common errors

* moved the scheduler to its own package to get it out of main and also start adding tests

* added a new err for invalid author images

* Updated an error used

* tests updated to avoid name duplication

* new func to replace the cached source recor and updated getcontent to return collected posts

* updated scheduler ref

* moved to services/cron
2022-05-15 21:48:23 -07:00

18 lines
702 B
Go

package services
import "errors"
var (
ErrMissingAuthorName = errors.New("unable to find the post author name")
ErrMissingAuthorImage = errors.New("unable to find the post author image")
ErrMissingThumbnail = errors.New("unable to find the post thumbnail url")
ErrMissingPublishDate = errors.New("unable to find the post publish date")
ErrMissingTags = errors.New("unable to find the post tags")
ErrMissingDescription = errors.New("unable to find the post description")
ErrMissingUrl = errors.New("unable to find the post url")
ErrInvalidAuthorImage = errors.New("expected value looks to be wrong, something is missing")
)
const DATETIME_FORMAT string = "1/2/2006 3:4 PM"