feed

package
v0.0.0-...-20f0d7a Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnnToImageAndText

func AnnToImageAndText(c *api.Client, ann api.Ann, rect image.Rectangle) (img *image.NRGBA, text string, err error)

func Created

func Created(ann api.Ann) (considered time.Time)

func LastModified

func LastModified(ann api.Ann) (considered time.Time)

Types

type ConsideredTime

type ConsideredTime func(ann api.Ann) (considered time.Time)

ConsideredTime gets the considered time of an api.Ann. For example, to get post api.Ann created after t, use Created.

type FormatImager

type FormatImager interface {
	FormatImage(api.Ann) (img image.Image, caption string, err error)
}

type Pipe

type Pipe struct {
	// contains filtered or unexported fields
}

func NewPipe

func NewPipe(ee Sink, c *api.Client, consideredTime ConsideredTime) *Pipe

func (*Pipe) After

func (p *Pipe) After(threshold time.Time) (toPost []api.Ann, err error)

func (*Pipe) Post

func (p *Pipe) Post(anns []api.Ann) (urls []*url.URL, err error)

func (*Pipe) PostAfter

func (p *Pipe) PostAfter(threshold time.Time) (urls []*url.URL, err error)

type Sink

type Sink interface {
	Post(api.Ann) (url *url.URL, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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