commands

package
v0.0.0-...-f93169f Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2014 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CfgFile string
View Source
var RootCmd = &cobra.Command{
	Use:   "dagobah",
	Short: "Dagobah is an awesome planet style RSS aggregator",
	Long: `Dagobah provides planet style RSS aggregation. It
is inspired by python planet. It has a simple YAML configuration
and provides it's own webserver.`,
	Run: rootRun,
}

Functions

func Channels

func Channels() *mgo.Collection

func CreateUniqueIndexes

func CreateUniqueIndexes()

func DB

func DB() *mgo.Database

func DBSession

func DBSession() *mgo.Session

func Execute

func Execute()

func Fetcher

func Fetcher()

func Items

func Items() *mgo.Collection

func Offset

func Offset(c *gin.Context) int

func PollFeed

func PollFeed(uri string)

func ProperHtml

func ProperHtml(text string) template.HTML

func RunnerMiddleware

func RunnerMiddleware() gin.HandlerFunc

func Server

func Server()

Types

type Chnl

type Chnl struct {
	ObjectId       bson.ObjectId `bson:"_id,omitempty"`
	Key            string
	Title          string
	Links          []rss.Link
	Description    string
	Language       string
	Copyright      string
	ManagingEditor string
	WebMaster      string
	PubDate        string
	LastBuildDate  string
	Docs           string
	Categories     []*rss.Category
	Generator      rss.Generator
	TTL            int
	Rating         string
	SkipHours      []int
	SkipDays       []int
	Image          rss.Image
	ItemKeys       []string
	Cloud          rss.Cloud
	TextInput      rss.Input
	Extensions     map[string]map[string][]rss.Extension
	Id             string
	Rights         string
	Author         rss.Author
	SubTitle       rss.SubTitle
}

func AllChannels

func AllChannels() []Chnl

func (Chnl) HomePage

func (c Chnl) HomePage() string

type Config

type Config struct {
	Feeds []string
	Port  int
}

type Itm

type Itm struct {
	ObjectId     bson.ObjectId `bson:"_id,omitempty"`
	Date         time.Time
	Key          string
	ChannelKey   string
	Title        string
	FullContent  string
	Links        []*rss.Link
	Description  string
	Author       rss.Author
	Categories   []*rss.Category
	Comments     string
	Enclosures   []*rss.Enclosure
	Guid         *string `bson:",omitempty"`
	Source       *rss.Source
	PubDate      string
	Id           string `bson:",omitempty"`
	Generator    *rss.Generator
	Contributors []string
	Content      *rss.Content
	Extensions   map[string]map[string][]rss.Extension
}
func (i Itm) FirstLink() (link rss.Link)

func (Itm) WorthShowing

func (i Itm) WorthShowing() bool

Jump to

Keyboard shortcuts

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