repo

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func Init

func Init()

Types

type Feed

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

func NewFeed

func NewFeed(db *gorm.DB) *Feed

func (Feed) All

func (f Feed) All() ([]*model.Feed, error)

func (Feed) Create

func (f Feed) Create(data []*model.Feed) error

func (Feed) Delete

func (f Feed) Delete(id uint) error

func (Feed) Get

func (f Feed) Get(id uint) (*model.Feed, error)

func (Feed) Update

func (f Feed) Update(id uint, feed *model.Feed) error

func (Feed) UpdateGroupID

func (f Feed) UpdateGroupID(from uint, to uint) error

type Group

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

func NewGroup

func NewGroup(db *gorm.DB) *Group

func (Group) All

func (f Group) All() ([]*model.Group, error)

func (Group) Create

func (f Group) Create(group *model.Group) error

func (Group) Delete

func (f Group) Delete(id uint) error

func (Group) Get

func (f Group) Get(id uint) (*model.Group, error)

func (Group) Update

func (f Group) Update(id uint, group *model.Group) error

type Item

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

func NewItem

func NewItem(db *gorm.DB) *Item

func (Item) Creates

func (i Item) Creates(items []*model.Item) error

func (Item) Delete

func (i Item) Delete(id uint) error

func (Item) DeleteByFeed

func (i Item) DeleteByFeed(feedID uint) error

func (Item) Get

func (i Item) Get(id uint) (*model.Item, error)

func (Item) IdentityExist

func (i Item) IdentityExist(feedID uint, guid, link, title string) (bool, error)

func (Item) List

func (i Item) List(filter ItemFilter, offset, count *int) ([]*model.Item, int, error)

func (Item) Update

func (i Item) Update(id uint, item *model.Item) error

type ItemFilter

type ItemFilter struct {
	Keyword *string
	FeedID  *uint
	Unread  *bool
}

Jump to

Keyboard shortcuts

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