riviera: hawx.me/code/riviera/feed/common Index | Files

package common

import "hawx.me/code/riviera/feed/common"

Package common contains structs for a unified feed format.

Index

Package Files

author.go category.go channel.go cloud.go content.go enclosure.go extension.go generator.go image.go input.go item.go link.go parser.go source.go subtitle.go timeparser.go

type Author Uses

type Author struct {
    Name  string
    URI   string
    Email string
}

type Category Uses

type Category struct {
    Domain string
    Text   string
}

type Channel Uses

type Channel struct {
    Categories     []Category
    Cloud          Cloud
    Copyright      string
    Description    string
    Docs           string
    Extensions     map[string]map[string][]Extension
    Generator      Generator
    Image          Image
    Items          []*Item
    Language       string
    LastBuildDate  string
    Links          []Link
    ManagingEditor string
    PubDate        string
    Rating         string
    SkipDays       []int
    SkipHours      []int
    TTL            int
    TextInput      Input
    Title          string
    WebMaster      string

    // Atom fields
    Author   Author
    ID       string
    Rights   string
    SubTitle SubTitle
}

func (*Channel) Key Uses

func (c *Channel) Key() string

type Cloud Uses

type Cloud struct {
    Domain            string
    Port              int
    Path              string
    RegisterProcedure string
    Protocol          string
}

type Content Uses

type Content struct {
    Type string
    Lang string
    Base string
    Text string
}

type Enclosure Uses

type Enclosure struct {
    URL    string
    Length int64
    Type   string
}

type Extension Uses

type Extension struct {
    Name      string
    Value     string
    Attrs     map[string]string
    Childrens map[string][]Extension
}

type GUID Uses

type GUID struct {
    GUID        string
    IsPermaLink bool
}

type Generator Uses

type Generator struct {
    URI     string
    Version string
    Text    string
}

type Image Uses

type Image struct {
    Title       string
    URL         string
    Link        string
    Width       int
    Height      int
    Description string
}

type Input Uses

type Input struct {
    Title       string
    Description string
    Name        string
    Link        string
}

type Item Uses

type Item struct {
    // RSS and Shared fields
    Author      Author
    Categories  []Category
    Comments    string
    Description string
    Enclosures  []Enclosure
    Thumbnail   *Image
    Extensions  map[string]map[string][]Extension
    GUID        *GUID
    Links       []Link
    PubDate     string
    Source      *Source
    Title       string

    // Atom specific fields
    Content      *Content
    Contributors []string
    Generator    *Generator
    ID           string
}

func (*Item) Key Uses

func (i *Item) Key() string

func (*Item) ParsedPubDate Uses

func (i *Item) ParsedPubDate() (time.Time, error)
type Link struct {
    Href     string
    Rel      string
    Type     string
    HrefLang string
}

type Parser Uses

type Parser interface {
    CanRead(io.Reader, func(charset string, input io.Reader) (io.Reader, error)) bool
    Read(io.Reader, func(charset string, input io.Reader) (io.Reader, error)) ([]*Channel, error)
}

type Source Uses

type Source struct {
    URL  string
    Text string
}

type SubTitle Uses

type SubTitle struct {
    Type string
    Text string
}

Package common imports 4 packages (graph) and is imported by 14 packages. Updated 2019-04-25. Refresh now. Tools for package owners.