collector

package
v0.0.0-...-a81b15a Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func New

func New(cfg *Config) (*Collector, error)

func (*Collector) Collect

func (c *Collector) Collect(cq ConditionQuery) error

type ConditionQuery

type ConditionQuery struct {
	URI string
}

type Config

type Config struct {
	Logger  log.Logger
	Storage Storage
}

type Record

type Record struct {
	ID          string `db:"id"`
	Code        string `db:"code"`
	Date        int64  `db:"date"`
	Link        string `db:"link"`
	PostID      string `db:"post_id"`
	Description string `db:"description"`
}

type Storage

type Storage interface {
	Collect(records Record) error
}

Jump to

Keyboard shortcuts

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