barefeed

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 3 Imported by: 0

README

go-barefeed GoDoc builds.sr.ht status

An implementation of the barefeed message format for Go.

Contributing

Send patches to ~chrisppy/beagles-devel@lists.sr.ht

License

MIT

Documentation

Overview

Package barefeed is an implementation of the barefeed message format for Go.

https://git.sr.ht/~chrisppy/go-barefeed

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bin added in v0.5.0

type Bin struct {
	Generator string  `bare:"generator"`
	Content   Content `bare:"content"`
}

func (*Bin) Decode added in v0.5.0

func (t *Bin) Decode(data []byte) error

func (*Bin) Encode added in v0.5.0

func (t *Bin) Encode() ([]byte, error)

func (Bin) Write added in v0.6.0

func (d Bin) Write(writer io.Writer) error

Write will output the Bin to the provided io writer

type Content added in v0.5.0

type Content interface {
	bare.Union
}

type Entry added in v0.2.0

type Entry struct {
	FeedID    string   `bare:"feedID"`
	EntryID   string   `bare:"entryID"`
	Read      bool     `bare:"read"`
	Liked     bool     `bare:"liked"`
	Position  uint     `bare:"position"`
	Title     Text     `bare:"title"`
	Content   Text     `bare:"content"`
	Updated   Time     `bare:"updated"`
	Published *Time    `bare:"published"`
	Authors   []Person `bare:"authors"`
	Links     []Link   `bare:"links"`
}

func (*Entry) Decode added in v0.5.0

func (t *Entry) Decode(data []byte) error

func (*Entry) Encode added in v0.5.0

func (t *Entry) Encode() ([]byte, error)

func (Entry) IsUnion added in v0.5.0

func (_ Entry) IsUnion()

type Feed added in v0.2.0

type Feed struct {
	FeedPath string   `bare:"feedPath"`
	FeedID   string   `bare:"feedID"`
	Title    Text     `bare:"title"`
	Updated  Time     `bare:"updated"`
	Authors  []Person `bare:"authors"`
	Links    []Link   `bare:"links"`
}

func (*Feed) Decode added in v0.5.0

func (t *Feed) Decode(data []byte) error

func (*Feed) Encode added in v0.5.0

func (t *Feed) Encode() ([]byte, error)

func (Feed) IsUnion added in v0.5.0

func (_ Feed) IsUnion()

type FeedMap added in v0.6.0

type FeedMap map[string]Linked

FeedMap map of Linked

func (FeedMap) Read added in v0.6.0

func (d FeedMap) Read(reader io.Reader) (err error)

Read will open the provided reader and load it into the FeedEntry

type Link struct {
	Href     string  `bare:"href"`
	Rel      *string `bare:"rel"`
	LinkType *string `bare:"linkType"`
	Lang     *string `bare:"lang"`
	Title    *string `bare:"title"`
	Length   *string `bare:"length"`
}

func (*Link) Decode added in v0.5.0

func (t *Link) Decode(data []byte) error

func (*Link) Encode added in v0.5.0

func (t *Link) Encode() ([]byte, error)

type Linked added in v0.6.0

type Linked struct {
	Feed    Feed
	Entries map[string]Entry
}

Linked containing the linkage between a Feed and Entry

type Person added in v0.2.0

type Person struct {
	Name  string  `bare:"name"`
	Email *string `bare:"email"`
	Uri   *string `bare:"uri"`
}

func (*Person) Decode added in v0.5.0

func (t *Person) Decode(data []byte) error

func (*Person) Encode added in v0.5.0

func (t *Person) Encode() ([]byte, error)

type Text added in v0.2.0

type Text struct {
	TextType string `bare:"textType"`
	Value    string `bare:"value"`
}

func (*Text) Decode added in v0.5.0

func (t *Text) Decode(data []byte) error

func (*Text) Encode added in v0.5.0

func (t *Text) Encode() ([]byte, error)

type Time added in v0.5.0

type Time string

func (*Time) Decode added in v0.5.0

func (t *Time) Decode(data []byte) error

func (*Time) Encode added in v0.5.0

func (t *Time) Encode() ([]byte, error)

Jump to

Keyboard shortcuts

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