types

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rate

type Rate struct {
	CreatedAt time.Time `bson:"created_at"`
	UpdatedAt time.Time `bson:"updated_at"`

	Currency string  `bson:"_id"`
	Base     string  `bson:"base"`
	Rate     float64 `bson:"rate"`
}

func GetNewRate

func GetNewRate(rate ratesTypes.CurrencyExchangeRate) *Rate

type Saving

type Saving struct {
	ID        primitive.ObjectID `bson:"_id,omitempty"`
	CreatedAt time.Time          `bson:"created_at"`
	UpdatedAt time.Time          `bson:"updated_at"`

	TelegramID int     `bson:"telegram_id"`
	Amount     float64 `bson:"amount"`
	Currency   string  `bson:"currency"`
}

func GetNewSaving

func GetNewSaving(telegramID int, amount float64, currency string) *Saving

type User

type User struct {
	CreatedAt time.Time `bson:"created_at"`
	UpdatedAt time.Time `bson:"updated_at"`

	ID           int    `bson:"telegram_id"`
	FirstName    string `bson:"first_name"`
	LastName     string `bson:"last_name"`
	UserName     string `bson:"username"`
	LanguageCode string `bson:"language_code"`

	BaseCurrency string `bson:"base"`
}

func GetNewUser

func GetNewUser(tgUser tgbotapi.User, baseCurrency string) *User

Jump to

Keyboard shortcuts

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