db

package
v0.0.0-...-2691637 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlatformTopdeck  = iota
	PlatformMtgtrade = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auction

type Auction struct {
	ID            string `json:"id" redis:"id"`
	Plaform       AuctionPlatform
	Name          string `json:"lot" redis:"lot"`
	Image         string `json:"image" redis:"image"`
	ImagePath     string `json:"image_path" redis:"image_path"`
	DatePublished string `json:"date_published" redis:"date_published"`
	DateEstimated string `json:"date_estimated" redis:"date_estimated"`

	BidInitial string `json:"start_bid" redis:"bid_initial"`
	BidCurrent string `json:"current_bid" redis:"bid_current"`
	BidCount   string `json:"bid_amount" redis:"bid_count"`
}

func (Auction) PicURL

func (a Auction) PicURL() string

func (Auction) URL

func (a Auction) URL() string

type AuctionDB

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

func NewAuctionDB

func NewAuctionDB(conn *redis.Client) *AuctionDB

func (*AuctionDB) Accept

func (db *AuctionDB) Accept(a Auction) (seen, dateChanged bool, err error)

type AuctionPlatform

type AuctionPlatform int

func (AuctionPlatform) String

func (p AuctionPlatform) String() string

type ChatDB

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

func NewChatDB

func NewChatDB(props tgbotbase.PropertyStorage) *ChatDB

func (*ChatDB) AddChat

func (db *ChatDB) AddChat(chatId int64)

func (*ChatDB) GetAll

func (db *ChatDB) GetAll() (users, chats []int64, err error)

func (*ChatDB) RemoveChat

func (db *ChatDB) RemoveChat(chatId int64)

Jump to

Keyboard shortcuts

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