Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Trae-AI/stream-to-river
/ functions
Functions
1,348 in github.com/Trae-AI/stream-to-river
⨍
Functions
1,348
◇
Types & classes
173
↓ 150 callers
Function
Assert
Assert asserts cond is true, otherwise fails the test.
internal/test/assert.go:16
↓ 38 callers
Function
GetDB
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 callers
Method
FastWriteNocopy
(buf []byte, w thrift.NocopyWriter)
rpcservice/kitex_gen/words/k-words.go:641
↓ 34 callers
Method
BLength
()
rpcservice/kitex_gen/words/k-words.go:659
↓ 21 callers
Function
HertzErrorResp
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 callers
Method
getInstance
()
client/src/service/asr-service.ts:36
↓ 16 callers
Function
BuildBaseResp
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 callers
Function
GetString
GetString is to Get global k:v config, the val is string
internal/config/localconfig.go:38
↓ 14 callers
Function
GetStringMap
GetStringMap is to Get global k:v config, the val is map[string]interface{}
internal/config/localconfig.go:43
↓ 14 callers
Method
getFullUrl
(path: string = '')
client/src/service/server-config.ts:61
↓ 13 callers
Method
Fatalf
(format string, args ...interface{})
internal/test/assert.go:11
↓ 12 callers
Function
QueryWord
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 callers
Method
Fatal
(args ...interface{})
internal/test/assert.go:10
↓ 10 callers
Method
String
()
rpcservice/kitex_gen/words/words.go:196
↓ 10 callers
Method
getToken
()
client/src/service/auth-service.ts:128
↓ 9 callers
Method
Reset
()
internal/test/assert_test.go:20
↓ 9 callers
Function
recreateMockWordTable
()
rpcservice/biz/words/word_test.go:205
↓ 8 callers
Function
AddWord
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 callers
Function
BuildSuccBaseResp
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 callers
Method
Helper
()
internal/test/assert.go:12
↓ 7 callers
Function
AddNewWord
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 callers
Method
FastRead
(buf []byte)
rpcservice/kitex_gen/words/k-words.go:315
↓ 6 callers
Method
ExpectFatal
(args ...interface{})
internal/test/assert_test.go:26
↓ 6 callers
Function
GetUserIDFromContext
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 callers
Function
InitCache
InitCache initializes the in - memory cache with the specified expiration and cleanup times.
rpcservice/dal/redis/init.go:25
↓ 6 callers
Method
InitDefault
()
rpcservice/kitex_gen/words/words.go:105
↓ 6 callers
Function
LoadConfig
(relativePath string)
internal/config/localconfig.go:19
↓ 6 callers
Method
getInstance
()
client/src/service/word-service.ts:27
↓ 6 callers
Method
getInstance
()
client/src/service/review-service.ts:58
↓ 6 callers
Function
processInlineElements
处理行内元素
apiservice/biz/repome/repome.go:382
↓ 5 callers
Method
FastRead
(buf []byte)
rpcservice/kitex_gen/base/k-base.go:23
↓ 5 callers
Function
NewBaseResp
()
rpcservice/kitex_gen/base/base.go:15
↓ 5 callers
Function
QueryWordByUserIdAndName
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 callers
Function
getTodayReviewProgressWithInitFlag
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 callers
Function
uuid
()
client/src/pages/index/utils.ts:6
↓ 4 callers
Method
FastRead
(buf []byte)
rpcservice/kitex_gen/words/k-words.go:29
↓ 4 callers
Function
InitLingoConfig
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 callers
Function
InitMockDB
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 callers
Function
LoadConfig
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 callers
Function
NewPronounceInfo
()
rpcservice/kitex_gen/words/words.go:17
↓ 4 callers
Function
ProcessWord
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 callers
Function
cleanupAudioResources
()
client/src/hooks/asr.tsx:15
↓ 4 callers
Method
getInstance
()
client/src/service/tag-service.ts:19
↓ 4 callers
Function
handleInputChange
(field: string, value: string)
client/src/components/login-form/index.tsx:106
↓ 4 callers
Function
recreateMockWordsReciteRecordTable
()
rpcservice/biz/words/word_test.go:235
↓ 4 callers
Function
writeString
( view: DataView, offset: number, string: string )
client/src/hooks/asr.tsx:128
↓ 3 callers
Function
AddAnswerList
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 callers
Method
FastRead
(buf []byte)
rpcservice/kitex_gen/words/k-words.go:4356
↓ 3 callers
Function
GetReviewWordList
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 callers
Function
GetTodayReviewProgress
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 callers
Method
IsSetExtra
()
rpcservice/kitex_gen/base/base.go:54
↓ 3 callers
Method
IsSetFilledName
()
rpcservice/kitex_gen/words/words.go:723
↓ 3 callers
Method
IsSetShowInfo
()
rpcservice/kitex_gen/words/words.go:611
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1272
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1350
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1417
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1484
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1560
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1636
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1712
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1788
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1864
↓ 3 callers
Method
IsSetSuccess
()
rpcservice/kitex_gen/words/words.go:1940
↓ 3 callers
Method
IsSetWord
()
rpcservice/kitex_gen/words/words.go:1173
↓ 3 callers
Function
NewWordResp
()
rpcservice/kitex_gen/words/words.go:1138
↓ 3 callers
Function
ServiceName
()
internal/suite/env/env.go:31
↓ 3 callers
Function
ServiceRegistryETCDHost
()
internal/suite/env/env.go:27
↓ 3 callers
Method
Set
(key string)
rpcservice/biz/chat/highlight.go:76
↓ 3 callers
Function
SubmitAnswer
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 callers
Function
UpdateWordTagID
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 callers
Function
cleanupWord
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 callers
Function
generateChooseQuestion
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 callers
Function
goToBottom
()
client/src/pages/index/index.tsx:106
↓ 3 callers
Function
handleAnswer
(answer: any)
client/src/components/vocabulary-review/index.tsx:125
↓ 3 callers
Method
handleAudioEnd
()
client/src/libs/audio-manager.ts:77
↓ 3 callers
Function
model2Word
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 callers
Method
notifyPlayingState
(wordId: number, isPlaying: boolean)
client/src/libs/audio-manager.ts:86
↓ 3 callers
Function
recreateMockReviewProgressTable
()
rpcservice/biz/words/word_test.go:245
↓ 3 callers
Function
serviceInfo
for server
rpcservice/kitex_gen/words/wordservice/wordservice.go:94
↓ 2 callers
Method
AddNewWord
(ctx context.Context, req *AddWordReq)
rpcservice/kitex_gen/words/words.go:1198
↓ 2 callers
Method
AddNewWord
(ctx context.Context, req *words.AddWordReq, callOptions ...callopt.Option)
rpcservice/kitex_gen/words/wordservice/client.go:21
↓ 2 callers
Function
AddWordsReciteRecord
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 callers
Method
AppendMessages
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 callers
Function
ArkModelStreamMsg
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 callers
Method
Chat
(ctx context.Context, req *words.ChatReq, callOptions ...streamcall.Option)
rpcservice/kitex_gen/words/wordservice/client.go:17
↓ 2 callers
Function
ChatHandler
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 callers
Function
CreateTmpConfFile
CreateTmpConfFile is only used for testing
internal/config/localconfig.go:58
↓ 2 callers
Function
DelWord
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 callers
Method
ExpectFatalf
(format string, args ...interface{})
internal/test/assert_test.go:30
↓ 2 callers
Method
Get
(key string)
rpcservice/biz/chat/highlight.go:82
↓ 2 callers
Function
GetAnswerListByOrderIds
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 callers
Function
GetAnswerListByWordId
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 callers
Function
GetArkModel
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 callers
Method
GetHistory
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 callers
Function
GetMaxOrderId
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 callers
Function
GetReviewRecords
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 callers
Method
GetReviewWordList
(ctx context.Context, req *ReviewListReq)
rpcservice/kitex_gen/words/words.go:1202
↓ 2 callers
Method
GetReviewWordList
(ctx context.Context, req *words.ReviewListReq, callOptions ...callopt.Option)
rpcservice/kitex_gen/words/wordservice/client.go:23
↓ 2 callers
Function
GetStringMapString
GetStringMapString is to Get global k:v config, the val is map[string]string
internal/config/localconfig.go:48
↓ 2 callers
Function
GetSupportedTags
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