MCPcopy Create free account

hub / github.com/Orenoid/telegram-account-bot / functions

Functions278 in github.com/Orenoid/telegram-account-bot

↓ 18 callersMethodSend
(bot *telebot.Bot, recipient telebot.Recipient, _ *telebot.SendOptions)
telebot/senders.go:16
↓ 18 callersMethodSender
Sender mocks base method.
mock/telebotmock/mock.go:527
↓ 13 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use.
mock/telebotmock/mock.go:34
↓ 12 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use.
dal/user/mock.go:33
↓ 11 callersMethodRender
()
telebot/templates.go:63
↓ 10 callersMethodGetBaseUserID
(teleUserID int64)
service/telegram/telegram.go:17
↓ 9 callersMethodText
()
telebot/senders.go:36
↓ 8 callersMethodCheckUserExists
(userID uint)
dal/user/repository.go:9
↓ 7 callersMethodGetUserBillsByCreateTime
GetUserBillsByCreateTime 获取用户在指定时间范围内的账单列表,若 opts 为空,则返回账单(opts 只取列表第一个作为查询参数)
dal/bill/repository.go:14
↓ 6 callersFunctionNewInMemoryUserStateManager
()
telebot/user_state.go:57
↓ 6 callersFunctionNewMockContext
NewMockContext creates a new mock instance.
mock/telebotmock/mock.go:27
↓ 6 callersMethodSetUserBalance
(userID uint, balance float64)
dal/user/repository.go:10
↓ 6 callersMethodSetupTest
(t *testing.T)
telebot/handlers_test.go:55
↓ 5 callersFunctionNewUserService
(userRepo user.Repository)
service/user/user.go:72
↓ 4 callersMethodClearUserState
(userID int64)
telebot/user_state.go:28
↓ 4 callersMethodCreateOrUpdateTelegramUser
(userID int64, userName string, chatID int64)
dal/telegram/repository.go:6
↓ 4 callersMethodDelete
Delete mocks base method.
mock/telebotmock/mock.go:169
↓ 4 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use.
telebot/user_state_mock.go:32
↓ 4 callersFunctionGetConfigFromEnv
()
conf/config.go:25
↓ 4 callersFunctionNewMockRepository
NewMockRepository creates a new mock instance.
dal/user/mock.go:26
↓ 4 callersFunctionParseBill
(text string)
telebot/handlers.go:244
↓ 4 callersMethodRender
()
telebot/templates.go:48
↓ 4 callersMethodSetUserState
(userID int64, state *UserState)
telebot/user_state.go:27
↓ 4 callersFunctiongetDayRange
获取某个时刻当天的0点-24点范围
telebot/handlers.go:121
↓ 3 callersMethodCallback
Callback mocks base method.
mock/telebotmock/mock.go:99
↓ 3 callersMethodChat
Chat mocks base method.
mock/telebotmock/mock.go:113
↓ 3 callersMethodCreateBillAndUpdateUserBalance
CreateBillAndUpdateUserBalance 为用户创建一个账单,并更新用户余额(若用户余额不为空)
dal/bill/repository.go:10
↓ 3 callersMethodCreateNewBill
(userID uint, amount float64, category string, opts ...bill.CreateBillOptions)
service/bill/bill.go:16
↓ 3 callersMethodCreateUser
user
dal/user/repository.go:8
↓ 3 callersMethodEdit
Edit mocks base method.
mock/telebotmock/mock.go:197
↓ 3 callersMethodGetUserState
(userID int64)
telebot/user_state.go:35
↓ 3 callersFunctionNewHandlerHub
(billService *bill.Service, teleService *telegram.Service, userService *user.Service, userStateManager UserSta
telebot/handlers.go:26
↓ 3 callersFunctionNewMockRepository
NewMockRepository creates a new mock instance.
dal/bill/mock.go:26
↓ 3 callersFunctionNewService
(teleRepo telegram.Repository)
service/telegram/telegram.go:25
↓ 3 callersFunctionNewService
(billRepo bill.Repository, userRepo user.Repository)
service/bill/bill.go:66
↓ 3 callersMethodOnEmpty
(ctx telebot.Context)
telebot/handlers.go:184
↓ 3 callersMethodRender
()
telebot/templates.go:19
↓ 3 callersMethodSetupTest
(t *testing.T)
service/user/user_test.go:32
↓ 3 callersMethodSetupTest
(t *testing.T)
service/bill/bill_test.go:39
↓ 3 callersFunctionparseAmount
parseAmount 解析数额,若前面不带 "+",则默认会解析为负数(平时大多数时候为支出)
telebot/handlers.go:227
↓ 2 callersMethodCreateToken
auth
dal/user/repository.go:15
↓ 2 callersMethodDisableAllTokens
(userID uint)
dal/user/repository.go:18
↓ 2 callersMethodGetUser
(teleUserID int64)
dal/telegram/repository.go:7
↓ 2 callersMethodGetUserBalance
(userID uint)
dal/user/repository.go:11
↓ 2 callersMethodGetUserState
(userID int64)
telebot/user_state.go:26
↓ 2 callersMethodHandleStartCommand
(ctx telebot.Context)
telebot/handlers.go:64
↓ 2 callersFunctionNewBot
(settings telebot.Settings, hub *HandlersHub)
telebot/telebot.go:8
↓ 2 callersFunctionNewMockRepository
NewMockRepository creates a new mock instance.
dal/telegram/mock.go:26
↓ 2 callersMethodOnCreatingBill
(ctx telebot.Context, userState *UserState)
telebot/handlers.go:200
↓ 2 callersFunctionPointer
(s string)
utils/strings/strings.go:3
↓ 2 callersFunctionRegisterHandlers
(bot *telebot.Bot, hub *HandlersHub)
telebot/telebot.go:19
↓ 2 callersMethodRender
()
telebot/templates.go:37
↓ 2 callersMethodReplyMarkup
()
telebot/senders.go:42
↓ 2 callersMethodReplyMarkup
()
telebot/senders.go:66
↓ 2 callersMethodSetupTest
(t *testing.T)
service/telegram/telegram_test.go:35
↓ 2 callersMethodText
()
telebot/senders.go:60
↓ 2 callersFunctiongetMonthRange
(t time.Time)
telebot/handlers.go:159
↓ 2 callersFunctiongetRandTime
()
service/user/user_test.go:87
↓ 2 callersMethodgetSortedCategories
(categoriesMapping map[string]decimal.Decimal)
telebot/templates.go:183
↓ 2 callersFunctiontextToKeyboard
(text string)
telebot/handlers.go:267
↓ 1 callersMethodCancelBillAndUpdateUserBalance
CancelBillAndUpdateUserBalance 取消订单并更新用户余额
service/bill/bill.go:33
↓ 1 callersFunctionCancelBillBtn
CancelBillBtn 构造用于取消某个订单的按钮
telebot/inlines.go:80
↓ 1 callersMethodClearUserState
(userID int64)
telebot/user_state.go:52
↓ 1 callersMethodCreateBillsAndUpdateUserBalance
CreateBillsAndUpdateUserBalance 为用户创建多个账单,并更新用户余额(若用户余额不为空)
dal/bill/repository.go:12
↓ 1 callersMethodCreateNewBills
(userID uint, billDTOs []CreateBillDTO)
service/bill/bill.go:44
↓ 1 callersMethodDeleteBillAndUpdateUserBalance
DeleteBillAndUpdateUserBalance 删除订单并更新用户余额
dal/bill/repository.go:16
↓ 1 callersFunctionGenerateToken
()
utils/strings/token.go:9
↓ 1 callersMethodGet
Get mocks base method.
mock/telebotmock/mock.go:311
↓ 1 callersFunctionGetEcho
(hub *ControllersHub)
api/api.go:13
↓ 1 callersMethodHandleText
(ctx telebot.Context)
telebot/handlers.go:168
↓ 1 callersMethodLen
()
telebot/templates.go:198
↓ 1 callersMethodMustGetToken
(token string)
dal/user/repository.go:16
↓ 1 callersMethodMustGetUserIDByToken
(token string)
service/user/user.go:64
↓ 1 callersFunctionNewControllersHub
(userService *user.Service, billService *bill.Service)
api/api.go:30
↓ 1 callersFunctionNewMockUserStateManager
NewMockUserStateManager creates a new mock instance.
telebot/user_state_mock.go:25
↓ 1 callersFunctionNextDayBillBtn
NextDayBillBtn 根据传入的年月日,生成用于将账单切换到后一天的按钮
telebot/inlines.go:35
↓ 1 callersFunctionNextMonthBillBtn
(year, month int)
telebot/inlines.go:63
↓ 1 callersMethodOnSettingKeyboard
(ctx telebot.Context)
telebot/handlers.go:256
↓ 1 callersFunctionPrevDayBillBtn
PrevDayBillBtn 根据传入的年月日,生成用于将账单切换到前一天的按钮
telebot/inlines.go:22
↓ 1 callersFunctionPrevMonthBillBtn
(year, month int)
telebot/inlines.go:51
↓ 1 callersMethodSend
(bot *telebot.Bot, recipient telebot.Recipient, _ *telebot.SendOptions)
telebot/senders.go:32
↓ 1 callersMethodSetUserState
(userID int64, state *UserState)
telebot/user_state.go:47
↓ 1 callersMethodUpdate
Update mocks base method.
mock/telebotmock/mock.go:599
↓ 1 callersMethodexpendSection
expendSection 支出记录
telebot/templates.go:90
↓ 1 callersMethodincomeSection
incomeSection 收入记录
telebot/templates.go:136
↓ 1 callersMethodtags
()
conf/config.go:15
MethodAccept
Accept mocks base method.
mock/telebotmock/mock.go:39
MethodAccept
Accept indicates an expected call of Accept.
mock/telebotmock/mock.go:51
MethodAnswer
Answer mocks base method.
mock/telebotmock/mock.go:57
MethodAnswer
Answer indicates an expected call of Answer.
mock/telebotmock/mock.go:65
MethodArgs
Args mocks base method.
mock/telebotmock/mock.go:71
MethodArgs
Args indicates an expected call of Args.
mock/telebotmock/mock.go:79
MethodBot
Bot mocks base method.
mock/telebotmock/mock.go:85
MethodBot
Bot indicates an expected call of Bot.
mock/telebotmock/mock.go:93
MethodCallback
Callback indicates an expected call of Callback.
mock/telebotmock/mock.go:107
MethodChat
Chat indicates an expected call of Chat.
mock/telebotmock/mock.go:121
MethodChatJoinRequest
ChatJoinRequest mocks base method.
mock/telebotmock/mock.go:127
MethodChatJoinRequest
ChatJoinRequest indicates an expected call of ChatJoinRequest.
mock/telebotmock/mock.go:135
MethodChatMember
ChatMember mocks base method.
mock/telebotmock/mock.go:141
MethodChatMember
ChatMember indicates an expected call of ChatMember.
mock/telebotmock/mock.go:149
next →1–100 of 278, ranked by callers