Documentation ¶
Index ¶
- func BuyAction(db *db.Database) (BuyInstruction, Buy)
- func NewBot(configuration *configuration.Configuration) *tgbotapi.BotAPI
- func NewMessagesBuffer() map[int]string
- func SellAction(db *db.Database) (SellInstruction, Sell)
- func User(update *tgbotapi.Update) *domain.User
- type Action
- type App
- type Buy
- type BuyInstruction
- type Sell
- type SellInstruction
- type Start
- type Trade
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBot ¶
func NewBot(configuration *configuration.Configuration) *tgbotapi.BotAPI
func NewMessagesBuffer ¶
func SellAction ¶
func SellAction(db *db.Database) (SellInstruction, Sell)
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (App) Process ¶
func (a App) Process(updates tgbotapi.UpdatesChannel)
type Buy ¶
type Buy struct { Command string Regex *regexp.Regexp Db *db.Database Users *db.Collection Assets *db.Collection Transactions *db.Collection }
type BuyInstruction ¶
type BuyInstruction struct {
Command string
}
type Sell ¶
type Sell struct { Command string Regex *regexp.Regexp Db *db.Database Users *db.Collection Assets *db.Collection Transactions *db.Collection }
type SellInstruction ¶
type SellInstruction struct {
Command string
}
type Start ¶
type Start struct { Command string Users *db.Collection }
func StartAction ¶
func StartAction(users *db.Collection) Start
type Trade ¶
type Trade struct { Total float64 Transaction domain.Transaction WalletAssets []domain.WalletAssetDocument AtomicHandler func(context mongo.SessionContext) (interface{}, error) }
type Wallet ¶
type Wallet struct { Command string Users *db.Collection }
func WalletAction ¶
func WalletAction(users *db.Collection) Wallet
Click to show internal directories.
Click to hide internal directories.