postgres

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(url string) (bot.Storage, error)

Types

type Repository

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

func (*Repository) AddTag

func (s *Repository) AddTag(ctx context.Context, user *bot.User, search string, tags []string) error

func (*Repository) GetUserByTelegramID

func (s *Repository) GetUserByTelegramID(ctx context.Context, id int64) (*bot.User, error)

func (*Repository) IterEntries

func (s *Repository) IterEntries(ctx context.Context, user *bot.User, from time.Time, tags []string) (<-chan *bot.Entry, error)

func (*Repository) ListTag

func (s *Repository) ListTag(ctx context.Context, user *bot.User, search []string) ([]string, error)

func (*Repository) RemoveTag

func (s *Repository) RemoveTag(ctx context.Context, user *bot.User, tags []string) error

func (*Repository) SaveEntry

func (s *Repository) SaveEntry(ctx context.Context, user *bot.User, entry *bot.Entry) (*bot.Entry, error)

func (*Repository) SaveReplyID

func (s *Repository) SaveReplyID(ctx context.Context, user *bot.User, message, reply int64) error

func (*Repository) SaveUser

func (s *Repository) SaveUser(ctx context.Context, user *bot.User) (*bot.User, error)

Jump to

Keyboard shortcuts

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