2009-11-23 12:46:12 +00:00
|
|
|
package feeder
|
|
|
|
|
|
|
|
type Channel struct {
|
2010-05-23 14:21:30 +00:00
|
|
|
Title string
|
|
|
|
Links []Link
|
|
|
|
Description string
|
|
|
|
Language string
|
|
|
|
Copyright string
|
|
|
|
ManagingEditor string
|
|
|
|
WebMaster string
|
|
|
|
PubDate string
|
|
|
|
LastBuildDate string
|
|
|
|
Docs string
|
2010-12-17 23:25:16 +00:00
|
|
|
Categories []*Category
|
2010-05-23 14:21:30 +00:00
|
|
|
Generator Generator
|
|
|
|
TTL int
|
|
|
|
Rating string
|
|
|
|
SkipHours []int
|
|
|
|
SkipDays []int
|
|
|
|
Image Image
|
2010-12-17 23:25:16 +00:00
|
|
|
Items []*Item
|
2010-05-23 14:21:30 +00:00
|
|
|
Cloud Cloud
|
|
|
|
TextInput Input
|
2014-01-23 19:37:50 +00:00
|
|
|
Extensions map[string]map[string][]Extension
|
2009-11-23 12:46:12 +00:00
|
|
|
|
|
|
|
// Atom fields
|
2010-05-23 14:21:30 +00:00
|
|
|
Id string
|
|
|
|
Rights string
|
|
|
|
Author Author
|
|
|
|
SubTitle SubTitle
|
2009-11-23 12:46:12 +00:00
|
|
|
}
|
2013-12-05 15:04:00 +00:00
|
|
|
|
|
|
|
func (c *Channel) Key() string {
|
|
|
|
switch {
|
|
|
|
case len(c.Id) != 0:
|
|
|
|
return c.Id
|
|
|
|
default:
|
|
|
|
return c.Title
|
|
|
|
}
|
|
|
|
}
|