Documentation ¶
Index ¶
- type BotCommandInfo
- type GetBotCommandUpdatesRequest
- type GetBotCommandUpdatesResponse
- type GetQuotationsRequest
- type GetQuotationsResponse
- type GetUpdatesRequest
- type GetUpdatesResponse
- type QuotationInfo
- type QuoteRepo
- type SendArbitrageNotifyRequest
- type SendErrorNotifyRequest
- type SendMessageRequest
- type TelegramBotRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotCommandInfo ¶
type GetBotCommandUpdatesRequest ¶
type GetBotCommandUpdatesRequest struct {
Offset int64 `json:"offset"`
}
type GetBotCommandUpdatesResponse ¶
type GetBotCommandUpdatesResponse struct { LastUpdateID *int64 Infos []*BotCommandInfo }
type GetQuotationsRequest ¶
type GetQuotationsRequest struct { }
type GetQuotationsResponse ¶
type GetQuotationsResponse struct {
Infos map[constant.Exchange]QuotationInfo
}
type GetUpdatesRequest ¶
type GetUpdatesRequest struct {
Offset int64 `json:"offset"`
}
type GetUpdatesResponse ¶
type GetUpdatesResponse struct { Result []struct { UpdateID int64 `json:"update_id"` Message *struct { MessageID int64 `json:"message_id"` From *struct { ID int64 `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` LastName string `json:"last_name"` } `json:"from"` Chat *struct { ID int64 `json:"id"` Title string `json:"title"` Type string `json:"type"` AllMembersAreAdministrators bool `json:"all_members_are_administrators"` } `json:"chat"` Date int64 `json:"date"` NewChatParticipant *struct { ID int64 `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` LastName string `json:"last_name"` } `json:"new_chat_participant"` NewChatMember *struct { ID int64 `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` LastName string `json:"last_name"` } `json:"new_chat_member"` NewChatMembers []struct { ID int64 `json:"id"` IsBot bool `json:"is_bot"` FirstName string `json:"first_name"` LastName string `json:"last_name"` } `json:"new_chat_members"` Text *string `json:"text"` Entities []struct { Offset int64 `json:"offset"` Length int64 `json:"length"` Type string `json:"type"` } `json:"entities"` } `json:"message"` } `json:"result"` }
type QuotationInfo ¶
type QuoteRepo ¶
type QuoteRepo interface {
GetQuotations(ctx context.Context, req GetQuotationsRequest) (*GetQuotationsResponse, error)
}
type SendArbitrageNotifyRequest ¶
type SendArbitrageNotifyRequest struct { ChatID int64 InvestAmount decimal.Decimal ExchangeBuy constant.Exchange ExchangeSell constant.Exchange BuyPrice decimal.Decimal SellPrice decimal.Decimal Spread decimal.Decimal Arbitrage decimal.Decimal Profit decimal.Decimal IsExcitedArbitrage, IsExcitedSpread bool }
type SendErrorNotifyRequest ¶
type SendMessageRequest ¶
type TelegramBotRepo ¶
type TelegramBotRepo interface { SendMessage(ctx context.Context, req SendMessageRequest) error SendArbitrageNotify(ctx context.Context, req SendArbitrageNotifyRequest) error SendErrorNotify(ctx context.Context, req SendErrorNotifyRequest) error GetUpdates(ctx context.Context, req GetUpdatesRequest) (*GetUpdatesResponse, error) GetBotCommandUpdates(ctx context.Context, req GetBotCommandUpdatesRequest) (*GetBotCommandUpdatesResponse, error) }
Click to show internal directories.
Click to hide internal directories.