Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Orenoid/telegram-account-bot
/ functions
Functions
278 in github.com/Orenoid/telegram-account-bot
⨍
Functions
278
◇
Types & classes
59
↓ 18 callers
Method
Send
(bot *telebot.Bot, recipient telebot.Recipient, _ *telebot.SendOptions)
telebot/senders.go:16
↓ 18 callers
Method
Sender
Sender mocks base method.
mock/telebotmock/mock.go:527
↓ 13 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
mock/telebotmock/mock.go:34
↓ 12 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
dal/user/mock.go:33
↓ 11 callers
Method
Render
()
telebot/templates.go:63
↓ 10 callers
Method
GetBaseUserID
(teleUserID int64)
service/telegram/telegram.go:17
↓ 9 callers
Method
Text
()
telebot/senders.go:36
↓ 8 callers
Method
CheckUserExists
(userID uint)
dal/user/repository.go:9
↓ 7 callers
Method
GetUserBillsByCreateTime
GetUserBillsByCreateTime 获取用户在指定时间范围内的账单列表,若 opts 为空,则返回账单(opts 只取列表第一个作为查询参数)
dal/bill/repository.go:14
↓ 6 callers
Function
NewInMemoryUserStateManager
()
telebot/user_state.go:57
↓ 6 callers
Function
NewMockContext
NewMockContext creates a new mock instance.
mock/telebotmock/mock.go:27
↓ 6 callers
Method
SetUserBalance
(userID uint, balance float64)
dal/user/repository.go:10
↓ 6 callers
Method
SetupTest
(t *testing.T)
telebot/handlers_test.go:55
↓ 5 callers
Function
NewUserService
(userRepo user.Repository)
service/user/user.go:72
↓ 4 callers
Method
ClearUserState
(userID int64)
telebot/user_state.go:28
↓ 4 callers
Method
CreateOrUpdateTelegramUser
(userID int64, userName string, chatID int64)
dal/telegram/repository.go:6
↓ 4 callers
Method
Delete
Delete mocks base method.
mock/telebotmock/mock.go:169
↓ 4 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
telebot/user_state_mock.go:32
↓ 4 callers
Function
GetConfigFromEnv
()
conf/config.go:25
↓ 4 callers
Function
NewMockRepository
NewMockRepository creates a new mock instance.
dal/user/mock.go:26
↓ 4 callers
Function
ParseBill
(text string)
telebot/handlers.go:244
↓ 4 callers
Method
Render
()
telebot/templates.go:48
↓ 4 callers
Method
SetUserState
(userID int64, state *UserState)
telebot/user_state.go:27
↓ 4 callers
Function
getDayRange
获取某个时刻当天的0点-24点范围
telebot/handlers.go:121
↓ 3 callers
Method
Callback
Callback mocks base method.
mock/telebotmock/mock.go:99
↓ 3 callers
Method
Chat
Chat mocks base method.
mock/telebotmock/mock.go:113
↓ 3 callers
Method
CreateBillAndUpdateUserBalance
CreateBillAndUpdateUserBalance 为用户创建一个账单,并更新用户余额(若用户余额不为空)
dal/bill/repository.go:10
↓ 3 callers
Method
CreateNewBill
(userID uint, amount float64, category string, opts ...bill.CreateBillOptions)
service/bill/bill.go:16
↓ 3 callers
Method
CreateUser
user
dal/user/repository.go:8
↓ 3 callers
Method
Edit
Edit mocks base method.
mock/telebotmock/mock.go:197
↓ 3 callers
Method
GetUserState
(userID int64)
telebot/user_state.go:35
↓ 3 callers
Function
NewHandlerHub
(billService *bill.Service, teleService *telegram.Service, userService *user.Service, userStateManager UserSta
telebot/handlers.go:26
↓ 3 callers
Function
NewMockRepository
NewMockRepository creates a new mock instance.
dal/bill/mock.go:26
↓ 3 callers
Function
NewService
(teleRepo telegram.Repository)
service/telegram/telegram.go:25
↓ 3 callers
Function
NewService
(billRepo bill.Repository, userRepo user.Repository)
service/bill/bill.go:66
↓ 3 callers
Method
OnEmpty
(ctx telebot.Context)
telebot/handlers.go:184
↓ 3 callers
Method
Render
()
telebot/templates.go:19
↓ 3 callers
Method
SetupTest
(t *testing.T)
service/user/user_test.go:32
↓ 3 callers
Method
SetupTest
(t *testing.T)
service/bill/bill_test.go:39
↓ 3 callers
Function
parseAmount
parseAmount 解析数额,若前面不带 "+",则默认会解析为负数(平时大多数时候为支出)
telebot/handlers.go:227
↓ 2 callers
Method
CreateToken
auth
dal/user/repository.go:15
↓ 2 callers
Method
DisableAllTokens
(userID uint)
dal/user/repository.go:18
↓ 2 callers
Method
GetUser
(teleUserID int64)
dal/telegram/repository.go:7
↓ 2 callers
Method
GetUserBalance
(userID uint)
dal/user/repository.go:11
↓ 2 callers
Method
GetUserState
(userID int64)
telebot/user_state.go:26
↓ 2 callers
Method
HandleStartCommand
(ctx telebot.Context)
telebot/handlers.go:64
↓ 2 callers
Function
NewBot
(settings telebot.Settings, hub *HandlersHub)
telebot/telebot.go:8
↓ 2 callers
Function
NewMockRepository
NewMockRepository creates a new mock instance.
dal/telegram/mock.go:26
↓ 2 callers
Method
OnCreatingBill
(ctx telebot.Context, userState *UserState)
telebot/handlers.go:200
↓ 2 callers
Function
Pointer
(s string)
utils/strings/strings.go:3
↓ 2 callers
Function
RegisterHandlers
(bot *telebot.Bot, hub *HandlersHub)
telebot/telebot.go:19
↓ 2 callers
Method
Render
()
telebot/templates.go:37
↓ 2 callers
Method
ReplyMarkup
()
telebot/senders.go:42
↓ 2 callers
Method
ReplyMarkup
()
telebot/senders.go:66
↓ 2 callers
Method
SetupTest
(t *testing.T)
service/telegram/telegram_test.go:35
↓ 2 callers
Method
Text
()
telebot/senders.go:60
↓ 2 callers
Function
getMonthRange
(t time.Time)
telebot/handlers.go:159
↓ 2 callers
Function
getRandTime
()
service/user/user_test.go:87
↓ 2 callers
Method
getSortedCategories
(categoriesMapping map[string]decimal.Decimal)
telebot/templates.go:183
↓ 2 callers
Function
textToKeyboard
(text string)
telebot/handlers.go:267
↓ 1 callers
Method
CancelBillAndUpdateUserBalance
CancelBillAndUpdateUserBalance 取消订单并更新用户余额
service/bill/bill.go:33
↓ 1 callers
Function
CancelBillBtn
CancelBillBtn 构造用于取消某个订单的按钮
telebot/inlines.go:80
↓ 1 callers
Method
ClearUserState
(userID int64)
telebot/user_state.go:52
↓ 1 callers
Method
CreateBillsAndUpdateUserBalance
CreateBillsAndUpdateUserBalance 为用户创建多个账单,并更新用户余额(若用户余额不为空)
dal/bill/repository.go:12
↓ 1 callers
Method
CreateNewBills
(userID uint, billDTOs []CreateBillDTO)
service/bill/bill.go:44
↓ 1 callers
Method
DeleteBillAndUpdateUserBalance
DeleteBillAndUpdateUserBalance 删除订单并更新用户余额
dal/bill/repository.go:16
↓ 1 callers
Function
GenerateToken
()
utils/strings/token.go:9
↓ 1 callers
Method
Get
Get mocks base method.
mock/telebotmock/mock.go:311
↓ 1 callers
Function
GetEcho
(hub *ControllersHub)
api/api.go:13
↓ 1 callers
Method
HandleText
(ctx telebot.Context)
telebot/handlers.go:168
↓ 1 callers
Method
Len
()
telebot/templates.go:198
↓ 1 callers
Method
MustGetToken
(token string)
dal/user/repository.go:16
↓ 1 callers
Method
MustGetUserIDByToken
(token string)
service/user/user.go:64
↓ 1 callers
Function
NewControllersHub
(userService *user.Service, billService *bill.Service)
api/api.go:30
↓ 1 callers
Function
NewMockUserStateManager
NewMockUserStateManager creates a new mock instance.
telebot/user_state_mock.go:25
↓ 1 callers
Function
NextDayBillBtn
NextDayBillBtn 根据传入的年月日,生成用于将账单切换到后一天的按钮
telebot/inlines.go:35
↓ 1 callers
Function
NextMonthBillBtn
(year, month int)
telebot/inlines.go:63
↓ 1 callers
Method
OnSettingKeyboard
(ctx telebot.Context)
telebot/handlers.go:256
↓ 1 callers
Function
PrevDayBillBtn
PrevDayBillBtn 根据传入的年月日,生成用于将账单切换到前一天的按钮
telebot/inlines.go:22
↓ 1 callers
Function
PrevMonthBillBtn
(year, month int)
telebot/inlines.go:51
↓ 1 callers
Method
Send
(bot *telebot.Bot, recipient telebot.Recipient, _ *telebot.SendOptions)
telebot/senders.go:32
↓ 1 callers
Method
SetUserState
(userID int64, state *UserState)
telebot/user_state.go:47
↓ 1 callers
Method
Update
Update mocks base method.
mock/telebotmock/mock.go:599
↓ 1 callers
Method
expendSection
expendSection 支出记录
telebot/templates.go:90
↓ 1 callers
Method
incomeSection
incomeSection 收入记录
telebot/templates.go:136
↓ 1 callers
Method
tags
()
conf/config.go:15
Method
Accept
Accept mocks base method.
mock/telebotmock/mock.go:39
Method
Accept
Accept indicates an expected call of Accept.
mock/telebotmock/mock.go:51
Method
Answer
Answer mocks base method.
mock/telebotmock/mock.go:57
Method
Answer
Answer indicates an expected call of Answer.
mock/telebotmock/mock.go:65
Method
Args
Args mocks base method.
mock/telebotmock/mock.go:71
Method
Args
Args indicates an expected call of Args.
mock/telebotmock/mock.go:79
Method
Bot
Bot mocks base method.
mock/telebotmock/mock.go:85
Method
Bot
Bot indicates an expected call of Bot.
mock/telebotmock/mock.go:93
Method
Callback
Callback indicates an expected call of Callback.
mock/telebotmock/mock.go:107
Method
Chat
Chat indicates an expected call of Chat.
mock/telebotmock/mock.go:121
Method
ChatJoinRequest
ChatJoinRequest mocks base method.
mock/telebotmock/mock.go:127
Method
ChatJoinRequest
ChatJoinRequest indicates an expected call of ChatJoinRequest.
mock/telebotmock/mock.go:135
Method
ChatMember
ChatMember mocks base method.
mock/telebotmock/mock.go:141
Method
ChatMember
ChatMember indicates an expected call of ChatMember.
mock/telebotmock/mock.go:149
next →
1–100 of 278, ranked by callers