model

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Title      string   `json:"title"`
	URL        string   `json:"url"`
	Image      string   `json:"image_url"`
	Categories []string `json:"categories"`
	SourceName string   `json:"source"`
	HaveStory  bool     `json:"has_story"`
}

func (Entry) FillFrom

func (e Entry) FillFrom(input IEntry) IEntry

func (Entry) HasStory

func (e Entry) HasStory() bool

func (Entry) Hash

func (e Entry) Hash() (string, error)

Hash of entry.

func (Entry) ImageURL

func (e Entry) ImageURL() string
func (e Entry) Link() string

func (Entry) SetHasStory

func (e Entry) SetHasStory(hasStory bool) IEntry

func (Entry) Source

func (e Entry) Source() string

func (Entry) Tags

func (e Entry) Tags() []string

func (Entry) Text

func (e Entry) Text() string

type IEntry

type IEntry interface {
	Text() string
	Link() string
	Tags() []string
	Source() string
	ImageURL() string
	Hash() (string, error)
	HasStory() bool
	SetHasStory(bool) IEntry

	FillFrom(IEntry) IEntry
}

Jump to

Keyboard shortcuts

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