MCPcopy Create free account

hub / github.com/Trae-AI/stream-to-river / functions

Functions1,348 in github.com/Trae-AI/stream-to-river

↓ 150 callersFunctionAssert
Assert asserts cond is true, otherwise fails the test.
internal/test/assert.go:16
↓ 38 callersFunctionGetDB
GetDB retrieves the global GORM database connection instance. Returns: - *gorm.DB: A pointer to the global GORM database connection.
rpcservice/dal/mysql/init.go:73
↓ 35 callersMethodFastWriteNocopy
(buf []byte, w thrift.NocopyWriter)
rpcservice/kitex_gen/words/k-words.go:641
↓ 34 callersMethodBLength
()
rpcservice/kitex_gen/words/k-words.go:659
↓ 21 callersFunctionHertzErrorResp
HertzErrorResp constructs a Hertz response map for error scenarios. It takes two string parameters: `msg` and `errMsg`. If `errMsg` is empty, it sets
apiservice/biz/utils/utils.go:19
↓ 20 callersMethodgetInstance
()
client/src/service/asr-service.ts:36
↓ 16 callersFunctionBuildBaseResp
BuildBaseResp constructs a new instance of the base.BaseResp struct. This function is used to generate a base response with a specified status code an
rpcservice/biz/words/common/common.go:17
↓ 16 callersFunctionGetString
GetString is to Get global k:v config, the val is string
internal/config/localconfig.go:38
↓ 14 callersFunctionGetStringMap
GetStringMap is to Get global k:v config, the val is map[string]interface{}
internal/config/localconfig.go:43
↓ 14 callersMethodgetFullUrl
(path: string = '')
client/src/service/server-config.ts:61
↓ 13 callersMethodFatalf
(format string, args ...interface{})
internal/test/assert.go:11
↓ 12 callersFunctionQueryWord
QueryWord queries the `word` table for a word record based on `word_id`. Parameters: - wordId: The unique identifier of the word. Returns: - *model.
rpcservice/dal/dao/word.go:201
↓ 10 callersMethodFatal
(args ...interface{})
internal/test/assert.go:10
↓ 10 callersMethodString
()
rpcservice/kitex_gen/words/words.go:196
↓ 10 callersMethodgetToken
()
client/src/service/auth-service.ts:128
↓ 9 callersMethodReset
()
internal/test/assert_test.go:20
↓ 9 callersFunctionrecreateMockWordTable
()
rpcservice/biz/words/word_test.go:205
↓ 8 callersFunctionAddWord
AddWord inserts a new word record into the `word` table. Parameters: - word: A pointer to the `model.Word` struct representing the word record to be
rpcservice/dal/dao/word.go:30
↓ 8 callersFunctionBuildSuccBaseResp
BuildSuccBaseResp constructs a new instance of the base.BaseResp struct for successful operations. This function sets the status code to 0 and the sta
rpcservice/biz/words/common/common.go:29
↓ 8 callersMethodHelper
()
internal/test/assert.go:12
↓ 7 callersFunctionAddNewWord
AddNewWord adds a new word to the system based on the provided request. It first checks if the word already exists for the user. If not, it adds the w
rpcservice/biz/words/word.go:64
↓ 7 callersMethodFastRead
(buf []byte)
rpcservice/kitex_gen/words/k-words.go:315
↓ 6 callersMethodExpectFatal
(args ...interface{})
internal/test/assert_test.go:26
↓ 6 callersFunctionGetUserIDFromContext
GetUserIDFromContext extracts the user ID from the JWT token in the request header. It checks if the authorization header is present, verifies the tok
apiservice/biz/user/user.go:271
↓ 6 callersFunctionInitCache
InitCache initializes the in - memory cache with the specified expiration and cleanup times.
rpcservice/dal/redis/init.go:25
↓ 6 callersMethodInitDefault
()
rpcservice/kitex_gen/words/words.go:105
↓ 6 callersFunctionLoadConfig
(relativePath string)
internal/config/localconfig.go:19
↓ 6 callersMethodgetInstance
()
client/src/service/word-service.ts:27
↓ 6 callersMethodgetInstance
()
client/src/service/review-service.ts:58
↓ 6 callersFunctionprocessInlineElements
处理行内元素
apiservice/biz/repome/repome.go:382
↓ 5 callersMethodFastRead
(buf []byte)
rpcservice/kitex_gen/base/k-base.go:23
↓ 5 callersFunctionNewBaseResp
()
rpcservice/kitex_gen/base/base.go:15
↓ 5 callersFunctionQueryWordByUserIdAndName
QueryWordByUserIdAndName queries the `word` table for a word record based on `user_id` and `word_name`. Parameters: - userId: The unique identifier o
rpcservice/dal/dao/word.go:48
↓ 5 callersFunctiongetTodayReviewProgressWithInitFlag
getTodayReviewProgressWithInitFlag retrieves the user's review progress for the current day and indicates whether initialization was performed. If the
rpcservice/biz/words/review_progress.go:42
↓ 5 callersFunctionuuid
()
client/src/pages/index/utils.ts:6
↓ 4 callersMethodFastRead
(buf []byte)
rpcservice/kitex_gen/words/k-words.go:29
↓ 4 callersFunctionInitLingoConfig
InitLingoConfig initializes the global Lingo service configuration. It sets the provided LingoConfig instance to the global variable lingoConfigInstan
rpcservice/biz/words/vocapi/voc_api.go:128
↓ 4 callersFunctionInitMockDB
InitMockDB initializes a mock database connection using SQLite. This function is typically used for testing purposes. It creates a new SQLite database
rpcservice/dal/mysql/init.go:59
↓ 4 callersFunctionLoadConfig
LoadConfig loads the application configuration from a YAML file. It sets the configuration file name and type, adds the configuration path, and reads
rpcservice/biz/config/loadconfig.go:42
↓ 4 callersFunctionNewPronounceInfo
()
rpcservice/kitex_gen/words/words.go:17
↓ 4 callersFunctionProcessWord
ProcessWord processes a given word by first checking the cache. If the word is not cached, it fetches the word details from the Lingo dictionary servi
rpcservice/biz/words/vocapi/voc_api.go:142
↓ 4 callersFunctioncleanupAudioResources
()
client/src/hooks/asr.tsx:15
↓ 4 callersMethodgetInstance
()
client/src/service/tag-service.ts:19
↓ 4 callersFunctionhandleInputChange
(field: string, value: string)
client/src/components/login-form/index.tsx:106
↓ 4 callersFunctionrecreateMockWordsReciteRecordTable
()
rpcservice/biz/words/word_test.go:235
↓ 4 callersFunctionwriteString
( view: DataView, offset: number, string: string )
client/src/hooks/asr.tsx:128
↓ 3 callersFunctionAddAnswerList
AddAnswerList adds a new record to the `answer_list` table. It first fetches the maximum `order_id` for the specified user. Then it sets the `order_id
rpcservice/dal/dao/answer_list.go:23
↓ 3 callersMethodFastRead
(buf []byte)
rpcservice/kitex_gen/words/k-words.go:4356
↓ 3 callersFunctionGetReviewWordList
GetReviewWordList retrieves the list of review words and generates corresponding review questions for a user. It first fetches the review records, the
rpcservice/biz/words/review_list.go:56
↓ 3 callersFunctionGetTodayReviewProgress
GetTodayReviewProgress retrieves the user's review progress for the current day. It's a wrapper function that calls `getTodayReviewProgressWithInitFla
rpcservice/biz/words/review_progress.go:27
↓ 3 callersMethodIsSetExtra
()
rpcservice/kitex_gen/base/base.go:54
↓ 3 callersMethodIsSetFilledName
()
rpcservice/kitex_gen/words/words.go:723
↓ 3 callersMethodIsSetShowInfo
()
rpcservice/kitex_gen/words/words.go:611
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1272
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1350
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1417
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1484
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1560
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1636
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1712
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1788
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1864
↓ 3 callersMethodIsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1940
↓ 3 callersMethodIsSetWord
()
rpcservice/kitex_gen/words/words.go:1173
↓ 3 callersFunctionNewWordResp
()
rpcservice/kitex_gen/words/words.go:1138
↓ 3 callersFunctionServiceName
()
internal/suite/env/env.go:31
↓ 3 callersFunctionServiceRegistryETCDHost
()
internal/suite/env/env.go:27
↓ 3 callersMethodSet
(key string)
rpcservice/biz/chat/highlight.go:76
↓ 3 callersFunctionSubmitAnswer
SubmitAnswer submits the answer for a word review. It validates the answer based on the question type, updates the review record, and increments the c
rpcservice/biz/words/submit_answer.go:34
↓ 3 callersFunctionUpdateWordTagID
UpdateWordTagID updates the `tag_id` for a word record. Parameters: - wordID: The unique identifier of the word. - userID: The unique identifier of t
rpcservice/dal/dao/word.go:120
↓ 3 callersFunctioncleanupWord
cleanupWord cleans up a word by removing whitespace, newline characters, carriage return characters, spaces, and tab characters. It is useful for stan
rpcservice/biz/words/word.go:290
↓ 3 callersFunctiongenerateChooseQuestion
generateChooseQuestion generates a multiple - choice review question for a word. It can generate different types of multiple - choice questions based
rpcservice/biz/words/review_list.go:362
↓ 3 callersFunctiongoToBottom
()
client/src/pages/index/index.tsx:106
↓ 3 callersFunctionhandleAnswer
(answer: any)
client/src/components/vocabulary-review/index.tsx:125
↓ 3 callersMethodhandleAudioEnd
()
client/src/libs/audio-manager.ts:77
↓ 3 callersFunctionmodel2Word
model2Word converts a pointer to a model.Word struct to a pointer to a words.Word struct. It maps fields from the model layer to the service layer. P
rpcservice/biz/words/word.go:263
↓ 3 callersMethodnotifyPlayingState
(wordId: number, isPlaying: boolean)
client/src/libs/audio-manager.ts:86
↓ 3 callersFunctionrecreateMockReviewProgressTable
()
rpcservice/biz/words/word_test.go:245
↓ 3 callersFunctionserviceInfo
for server
rpcservice/kitex_gen/words/wordservice/wordservice.go:94
↓ 2 callersMethodAddNewWord
(ctx context.Context, req *AddWordReq)
rpcservice/kitex_gen/words/words.go:1198
↓ 2 callersMethodAddNewWord
(ctx context.Context, req *words.AddWordReq, callOptions ...callopt.Option)
rpcservice/kitex_gen/words/wordservice/client.go:21
↓ 2 callersFunctionAddWordsReciteRecord
AddWordsReciteRecord inserts a new review record into the `words_recite_record` table. Parameters: - record: A pointer to the `model.WordsReciteRecor
rpcservice/dal/dao/review_record.go:20
↓ 2 callersMethodAppendMessages
AppendMessages appends new user and assistant messages to the conversation history It also truncates the history to ensure it does not exceed the maxi
rpcservice/biz/chat/history.go:85
↓ 2 callersFunctionArkModelStreamMsg
ArkModelStreamMsg creates a streaming message from the Ark model. It initializes the Ark model and creates a streaming message based on the conversati
rpcservice/biz/chat/chat.go:196
↓ 2 callersMethodChat
(ctx context.Context, req *words.ChatReq, callOptions ...streamcall.Option)
rpcservice/kitex_gen/words/wordservice/client.go:17
↓ 2 callersFunctionChatHandler
ChatHandler handles the chat request with streaming. It initializes the conversation, creates a model stream, and processes model chunks. It also hand
rpcservice/biz/chat/chat.go:70
↓ 2 callersFunctionCreateTmpConfFile
CreateTmpConfFile is only used for testing
internal/config/localconfig.go:58
↓ 2 callersFunctionDelWord
DelWord deletes a word record from the `word` table based on `word_id`. Parameters: - wordId: The unique identifier of the word. Returns: - error: A
rpcservice/dal/dao/word.go:242
↓ 2 callersMethodExpectFatalf
(format string, args ...interface{})
internal/test/assert_test.go:30
↓ 2 callersMethodGet
(key string)
rpcservice/biz/chat/highlight.go:82
↓ 2 callersFunctionGetAnswerListByOrderIds
GetAnswerListByOrderIds queries the `answer_list` table for records based on the `user_id` and a list of `order_ids`. Parameters: - userId: The uniqu
rpcservice/dal/dao/answer_list.go:76
↓ 2 callersFunctionGetAnswerListByWordId
GetAnswerListByWordId queries the `answer_list` table for a record based on the `user_id` and `word_id`. Parameters: - userId: The unique identifier
rpcservice/dal/dao/answer_list.go:121
↓ 2 callersFunctionGetArkModel
GetArkModel initializes and returns a new instance of the Ark chat model. It uses the predefined API key and model name to configure the model. Param
rpcservice/biz/llm/arkmodel.go:38
↓ 2 callersMethodGetHistory
GetHistory retrieves the chat history of the conversation This function is non - strongly dependent and does not return an error Parameters: - ctx: Th
rpcservice/biz/chat/history.go:71
↓ 2 callersFunctionGetMaxOrderId
GetMaxOrderId retrieves the maximum `order_id` for a user from the `answer_list` table. Parameters: - userId: The unique identifier of the user. Ret
rpcservice/dal/dao/answer_list.go:98
↓ 2 callersFunctionGetReviewRecords
GetReviewRecords queries the `words_recite_record` table for review records that need to be reviewed. It filters records where the `next_review_time`
rpcservice/dal/dao/review_record.go:116
↓ 2 callersMethodGetReviewWordList
(ctx context.Context, req *ReviewListReq)
rpcservice/kitex_gen/words/words.go:1202
↓ 2 callersMethodGetReviewWordList
(ctx context.Context, req *words.ReviewListReq, callOptions ...callopt.Option)
rpcservice/kitex_gen/words/wordservice/client.go:23
↓ 2 callersFunctionGetStringMapString
GetStringMapString is to Get global k:v config, the val is map[string]string
internal/config/localconfig.go:48
↓ 2 callersFunctionGetSupportedTags
GetSupportedTags retrieves all supported word tag types from the database. It queries the database for all word tags and converts them into the respon
rpcservice/biz/words/word_tags.go:29
next →1–100 of 1,348, ranked by callers