impl

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const DONGERLIST = "http://dongerlist.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Dong

type Dong struct {
	gorm.Model
	Dong     string
	Category string
}

TODO: At some point remove gorm.

func (Dong) String

func (d Dong) String() string

func (Dong) ToDomainDong

func (d Dong) ToDomainDong() dong.Emoji

type GormRepository

type GormRepository struct {
	// contains filtered or unexported fields
}

func NewGormRepository

func NewGormRepository(database *gorm.DB) *GormRepository

func (GormRepository) Categories

func (g GormRepository) Categories() ([]string, error)

func (GormRepository) Count

func (g GormRepository) Count() int64

func (GormRepository) Random

func (g GormRepository) Random() (dong.Emoji, error)

func (GormRepository) RandomByCategory

func (g GormRepository) RandomByCategory(cat string) (dong.Emoji, error)

func (GormRepository) Save

func (g GormRepository) Save(emojis []dong.Emoji) error

type WebFetcher

type WebFetcher struct {
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper() *WebFetcher

func (*WebFetcher) Fetch

func (s *WebFetcher) Fetch() ([]dong.Emoji, error)

Jump to

Keyboard shortcuts

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