rsschannel

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 4 Imported by: 4

Documentation

Overview

Package rsschannel provides functionality to act with rsserver's channel Table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(channels *sql.Rows, ret *[]*Schema) (err error)

Fetch fetch the rsschannel channel rows from database and store it in channel array ret.

Types

type Schema

type Schema struct {
	ID      int    `json:"id,omitempty"`
	RSSLink string `json:"rsslink,omitempty"`
	gofeed.Feed
}

Schema shows the rsschannel table schema that is really used.

type Table

type Table struct {
	Connection *sql.DB
}

Table contains the db connection to rsschannel Table.

func (*Table) Create

func (table *Table) Create(rssLink string) (err error)

Create makes a new channel instance with the rsslink. It is stored in the configured database.

func (*Table) Select added in v1.3.1

func (table *Table) Select(channels *[]*Schema) (err error)

Select fetch the information of channels in the database and store it in channels array. You can see type Schema in model.go to check the features.

func (table *Table) SelectLinks(channels *[]*Schema) (err error)

SelectLinks fetch the rss links of channels with its id and store it in channels array.

func (*Table) SelectWithItems added in v1.3.1

func (table *Table) SelectWithItems(channels *[]*Schema, ids *[]int, count int) (err error)

SelectWithItems fetch channels with its items. You can limit the channels and items number by the parameter ids and count.

Jump to

Keyboard shortcuts

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