models

package
v0.0.0-...-2abc9a5 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CamCamCamDeal

type CamCamCamDeal struct {
	Id        string `json:"id"`
	Title     string `json:"title"`
	Url       string `json:"url"`
	Published string `json:"time"`
	Image     string `json:"image"`
	DealType  int    `json:"dealtype"`
}

Camel Camel Camel deal type

type OzBargainDeal

type OzBargainDeal struct {
	Id       string `json:"id"`
	Title    string `json:"title"`
	Url      string `json:"url"`
	PostedOn string `json:"time"`
	Upvotes  string `json:"upvotes"`
	DealAge  string `json:"dealage"`
	DealType int    `json:"dealtype"`
}

Ozbargain deal type

func (*OzBargainDeal) GetDealAge

func (d *OzBargainDeal) GetDealAge() string

func (*OzBargainDeal) GetDealType

func (d *OzBargainDeal) GetDealType() int

func (*OzBargainDeal) GetId

func (d *OzBargainDeal) GetId() string

func (*OzBargainDeal) GetPostedOn

func (d *OzBargainDeal) GetPostedOn() string

func (*OzBargainDeal) GetTitle

func (d *OzBargainDeal) GetTitle() string

func (*OzBargainDeal) GetUpvotes

func (d *OzBargainDeal) GetUpvotes() string

func (*OzBargainDeal) GetUrl

func (d *OzBargainDeal) GetUrl() string

func (*OzBargainDeal) SetDealAge

func (d *OzBargainDeal) SetDealAge(dealAge string)

func (*OzBargainDeal) SetDealType

func (d *OzBargainDeal) SetDealType(dealType int)

func (*OzBargainDeal) SetId

func (d *OzBargainDeal) SetId(id string)

Setters and getters for OzBargainDeal

func (*OzBargainDeal) SetPostedOn

func (d *OzBargainDeal) SetPostedOn(postedOn string)

func (*OzBargainDeal) SetTitle

func (d *OzBargainDeal) SetTitle(title string)

func (*OzBargainDeal) SetUpvotes

func (d *OzBargainDeal) SetUpvotes(upvotes string)

func (*OzBargainDeal) SetUrl

func (d *OzBargainDeal) SetUrl(url string)

type PipupImage

type PipupImage struct {
	Image *PipupUri `json:"image"`
}

type PipupSimpleToast

type PipupSimpleToast struct {
	Title    string `json:"title"`
	Message  string `json:"message"`
	Duration int    `json:"duration"`
	Position int    `json:"position"`
}

type PipupToast

type PipupToast struct {
	Duration        int         `json:"duration"`
	Position        int         `json:"position"`
	Title           string      `json:"title"`
	TitleColor      string      `json:"titleColor"`
	TitleSize       int         `json:"titleSize"`
	Message         string      `json:"message"`
	MessageColor    string      `json:"messageColor"`
	MessageSize     int         `json:"messageSize"`
	BackgroundColor string      `json:"backgroundColor"`
	Media           interface{} `json:"media"`
}

type PipupUri

type PipupUri struct {
	Uri   string `json:"uri"`
	Width int    `json:"width"`
}

type PipupVideo

type PipupVideo struct {
	Video *PipupUri `json:"video"`
}

type PipupWeb

type PipupWeb struct {
	Web *PipupUri `json:"web"`
}

type UserData

type UserData struct {
	ChatID         int64    `bson:"chat_id"`         // Telegram chat ID
	Username       string   `bson:"username"`        // Telegram username
	OzbGood        bool     `bson:"ozb_good"`        // watch deals with 25+ upvotes in the last 24 hours
	OzbSuper       bool     `bson:"ozb_super"`       // watch deals with 50+ upvotes in the last 24 hours
	Keywords       []string `bson:"keywords"`        // list of keywords / deals to watch for
	OzbSent        []string `bson:"ozb_sent"`        // comma separated list of ozb deals sent to user
	AmzDaily       bool     `bson:"amz_daily"`       // watch top daily deals on amazon
	AmzWeekly      bool     `bson:"amz_weekly"`      // watch top weekly deals on amazon
	AmzSent        []string `bson:"amz_sent"`        // comma separated list of amz deals sent to user
	UsernameChosen string   `bson:"username_chosen"` // username chosen by user on website
	Password       string   `bson:"password"`        // password chosen by user on website
}

User data model

func (*UserData) GetAmzDaily

func (u *UserData) GetAmzDaily() bool

func (*UserData) GetAmzSent

func (u *UserData) GetAmzSent() []string

func (*UserData) GetAmzWeekly

func (u *UserData) GetAmzWeekly() bool

func (*UserData) GetChatID

func (u *UserData) GetChatID() int64

func (*UserData) GetKeywords

func (u *UserData) GetKeywords() []string

func (*UserData) GetOzbGood

func (u *UserData) GetOzbGood() bool

func (*UserData) GetOzbSent

func (u *UserData) GetOzbSent() []string

func (*UserData) GetOzbSuper

func (u *UserData) GetOzbSuper() bool

func (*UserData) GetUsername

func (u *UserData) GetUsername() string

func (*UserData) GetUsernameChosen

func (u *UserData) GetUsernameChosen() string

func (*UserData) SetAmzDaily

func (u *UserData) SetAmzDaily(amzDaily bool)

func (*UserData) SetAmzSent

func (u *UserData) SetAmzSent(amzSent []string)

func (*UserData) SetAmzWeekly

func (u *UserData) SetAmzWeekly(amzWeekly bool)

func (*UserData) SetChatID

func (u *UserData) SetChatID(chatID int64)

setters and getters for UserData

func (*UserData) SetKeywords

func (u *UserData) SetKeywords(keywords []string)

func (*UserData) SetOzbGood

func (u *UserData) SetOzbGood(ozbGood bool)

func (*UserData) SetOzbSent

func (u *UserData) SetOzbSent(ozbSent []string)

func (*UserData) SetOzbSuper

func (u *UserData) SetOzbSuper(ozbSuper bool)

func (*UserData) SetUsername

func (u *UserData) SetUsername(username string)

func (*UserData) SetUsernameChosen

func (u *UserData) SetUsernameChosen(usernameChosen string)

type UserStore

type UserStore struct {
	Users map[int64]*UserData
}

User model - indexed by chat ID

Jump to

Keyboard shortcuts

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