storage

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: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func New

func New(pathDB string, logger log.Logger) (*Storage, error)

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) Collect

func (s *Storage) Collect(record collector.Record) error

func (*Storage) CountNotUseCoupon

func (s *Storage) CountNotUseCoupon(cid int64) (uint64, error)

func (*Storage) GetChat

func (s *Storage) GetChat() (a []int64, err error)

func (*Storage) GetCountUser

func (s *Storage) GetCountUser() (int, error)

func (*Storage) GetNotUseCoupon

func (s *Storage) GetNotUseCoupon(cid int64) ([]collector.Record, error)

func (*Storage) GetNotUseCouponCount

func (s *Storage) GetNotUseCouponCount(cid, count int64) ([]collector.Record, error)

func (*Storage) GetUnsentNotification

func (s *Storage) GetUnsentNotification() ([]model.Notification, error)

func (*Storage) LoadCollect

func (s *Storage) LoadCollect() (map[string]collector.Record, error)

func (*Storage) MarkAsRead

func (s *Storage) MarkAsRead(cid int64, rr []collector.Record) error

func (*Storage) MarkSentNotification

func (s *Storage) MarkSentNotification(id int64) error

func (*Storage) NewChat

func (s *Storage) NewChat(chat *tgbotapi.Chat) error

func (*Storage) NewMessage

func (s *Storage) NewMessage(msg *tgbotapi.Message) error

func (*Storage) UpdChatActivity

func (s *Storage) UpdChatActivity(cid int64, act bool) error

Jump to

Keyboard shortcuts

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