bot

package
v0.0.0-...-3cf4c9a Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, bot Bot)

Types

type Bot

type Bot interface {
	Init(parser parser.Parser, dao dao.DaoContainer)
	Start(root string)
	Debug(is_debug bool)
	Version() string
}

func NewBot

func NewBot(name string) (Bot, error)

type CyBot

type CyBot struct {
	common.CyeamBot
	parser.NormalParser
	// contains filtered or unexported fields
}

func (*CyBot) Debug

func (this *CyBot) Debug(is_debug bool)

func (*CyBot) Init

func (this *CyBot) Init(parser parser.Parser, dao dao.DaoContainer)

func (*CyBot) Start

func (this *CyBot) Start(root string)

func (*CyBot) Version

func (this *CyBot) Version() string

type RssBot

type RssBot struct {
	common.CyeamBot
	// contains filtered or unexported fields
}

func (*RssBot) Debug

func (this *RssBot) Debug(is_debug bool)

func (*RssBot) Init

func (this *RssBot) Init(parser parser.Parser, dao dao.DaoContainer)

func (*RssBot) Start

func (this *RssBot) Start(root string)

func (*RssBot) Version

func (this *RssBot) Version() string

type RssChannel

type RssChannel struct {
	XMLName       xml.Name   `xml:"channel"`
	Title         string     `xml:"title"`
	Description   string     `xml:"description"`
	Link          string     `xml:"link"`
	Language      string     `xml:"language"`
	PubDate       string     `xml:"pubDate"`
	LastBuildDate string     `xml:"lastBuildDate"`
	Items         []*RssItem `xml:"item"`
}

type RssFeed

type RssFeed struct {
	XMLName xml.Name    `xml:"rss"`
	Channel *RssChannel `xml:"channel"`
}

type RssItem

type RssItem struct {
	XMLName     xml.Name `xml:"item"`
	Title       string   `xml:"title"` // required
	Figure      string   `xml:"figure"`
	Link        string   `xml:"link"`        // required
	Description string   `xml:"description"` // required
	Author      string   `xml:"author,omitempty"`
	Category    string   `xml:"category,omitempty"`
	Comments    string   `xml:"comments,omitempty"`
	Guid        string   `xml:"guid,omitempty"`    // Id used
	PubDate     string   `xml:"pubDate,omitempty"` // created or updated
	Source      string   `xml:"source,omitempty"`
}

Jump to

Keyboard shortcuts

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