repository

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxIDKey = "maxID"
View Source
var MinIDKey = "minID"

Functions

func IsValidKey

func IsValidKey(key string) bool

Types

type Logger

type Logger interface {
	Println(i ...interface{})
	Printf(format string, i ...interface{})
}

type Repository

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

func New

func New(dbPath string, logger Logger) (*Repository, error)

func (*Repository) Close

func (r *Repository) Close() error

func (*Repository) DownloadImageFromDB

func (r *Repository) DownloadImageFromDB(downloadDir string) error

func (*Repository) GetMaxID

func (r *Repository) GetMaxID() (int64, error)

func (*Repository) GetMinID

func (r *Repository) GetMinID() (int64, error)

func (*Repository) SaveMaxId

func (r *Repository) SaveMaxId(maxId int64) (bool, error)

func (*Repository) SaveMinId

func (r *Repository) SaveMinId(minId int64) (bool, error)

func (*Repository) SaveTweet

func (r *Repository) SaveTweet(tweet *anaconda.Tweet) error

func (*Repository) SendTweetStrToChannel

func (r *Repository) SendTweetStrToChannel(ch chan string) error

SendTweetStrToChannel send tweet strings in DB to provided channel

func (*Repository) SetMaxId

func (r *Repository) SetMaxId(maxId int64) error

func (*Repository) SetMinId

func (r *Repository) SetMinId(minId int64) error

Jump to

Keyboard shortcuts

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