models

package
v0.0.0-...-56114fe Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// RootFolder is the unique name of the root folder.
	// Any folders imported with this name will get merged with this folder.
	RootFolder = "<root>"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	// Primary key
	ID       int64
	FeedID   int64
	FolderID int64
	// Data fields
	Title     string
	Summary   string
	Content   string
	Parsed    string
	Link      string
	Read      bool
	Date      time.Time
	Retrieved time.Time
	// Metadata
	SyntheticDate bool
}

Article is a single fetched article.

func (*Article) GetContents

func (a *Article) GetContents(serveParsed bool) string

GetContents tries to return a non-empty content field for this article.

func (*Article) Hash

func (a *Article) Hash() string

Hash returns a SHA256 hash of this object.

type Feed

type Feed struct {
	// Primary key
	ID       int64
	FolderID int64
	// Data fields
	Title       string
	Description string
	URL         string
	Link        string
	Latest      time.Time
}

Feed is a single source of articles.

func (*Feed) Hash

func (a *Feed) Hash() string

Hash returns a SHA256 hash of this object.

type Folder

type Folder struct {
	// Primary key
	ID int64
	// Data fields
	Name    string
	Feed    []Feed
	Folders []Folder
}

Folder is a collection of feeds and subfolders.

type User

type User struct {
	// Primary key
	UserId   UserId
	Username string
	Key      string
	HashPass string
}

User is a single user of the application.

func (*User) Valid

func (u *User) Valid() bool

Valid returns true if this object is well-formed.

type UserId

type UserId string

UserId is a unique reference to a single user in the system.

Jump to

Keyboard shortcuts

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