models

package
v0.0.0-...-f2b64ca Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 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 Content

type Content struct {
	ID           uint64 `gorm:"primaryKey"`
	HashID       string `gorm:"primaryKey"`
	SourceURL    string
	Title        string
	FeedID       uint64
	Description  string `gorm:"-"` //ignore to db
	TelegraphURL string
}

Content is a single passage crawled from feed

type Feed

type Feed struct {
	SourceID     uint
	FeedID       string
	TelegraphURL string
	Item         *gofeed.Item
}

Feed is a struct used in communication between Poller and other modules

type Source

type Source struct {
	ID             uint    `gorm:"primaryKey;AUTO_INCREMENT"`
	Users          []*User `gorm:"many2many:user_sources"`
	URL            string
	Title          string
	UpdateInterval uint
	ErrorCount     uint
}

type User

type User struct {
	ID         int64 `gorm:"primaryKey"`
	TelegramID int64
	Sources    []*Source `gorm:"many2many:user_sources"`
}

Jump to

Keyboard shortcuts

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