MCPcopy Create free account

hub / github.com/bodhiye/paste / functions

Functions81 in github.com/bodhiye/paste

↓ 5 callersFunctionformat
* {@link https://wcoder.github.io/notes/string-format-for-string-formating-in-javascript} * @param {string} format * @param {array} args
web/src/utils/highlightjs-line-numbers.js:260
↓ 4 callersMethodSnippetsLength
()
server/util/limit.go:20
↓ 3 callersMethodGet
(ctx context.Context, key, password string)
server/db/paste.go:27
↓ 3 callersMethodSet
(ctx context.Context, entry PasteEntry)
server/db/paste.go:26
↓ 3 callersFunctionsetI18nLanguage
(lang)
web/src/assets/i18n.js:16
↓ 2 callersFunctionGenReqID
GenReqID 生成一个新的请求ID 该ID是由进程ID和当前的纳秒时间戳组成的,并使用Base64 URL编码格式返回
server/util/reqid.go:23
↓ 2 callersMethodImagesCount
()
server/util/limit.go:38
↓ 2 callersMethodImagesSize
()
server/util/limit.go:32
↓ 2 callersMethodInit
Init 方法用于初始化 MongoDB 的集合,例如创建索引
server/db/paste.go:80
↓ 2 callersMethodSnippetsCount
()
server/util/limit.go:26
↓ 2 callersFunctiongetLines
(text)
web/src/utils/highlightjs-line-numbers.js:242
↓ 2 callersFunctionr
(n)
web/src/utils/markdown-it-mermaid.js:4
↓ 2 callersFunctionsetDefaultLimits
设置默认限制值
server/util/limit.go:70
↓ 2 callersFunctionu
(e)
web/src/utils/markdown-it-mermaid.js:28
↓ 1 callersFunctionEnsureWithReqId
EnsureWithReqId 确保上下文中有一个请求ID 如果没有请求ID,则生成一个新的请求ID并将其添加到上下文中 返回更新后的上下文和请求ID
server/util/reqid.go:66
↓ 1 callersFunctionFileToBase64
将文件转换为base64编码
server/storage/storage.go:85
↓ 1 callersMethodGetSignedURL
(ctx context.Context, objectKey string)
server/storage/oss.go:26
↓ 1 callersFunctionInstance
(key = "", problem_id = "")
web/src/utils/markdown-it.js:9
↓ 1 callersFunctionNewOSSWithFactory
(provider string)
server/storage/oss.go:29
↓ 1 callersFunctionNewTencentOSS
()
server/storage/tencent.go:33
↓ 1 callersMethodSetLifeCycle
(ctx context.Context)
server/storage/tencent.go:102
↓ 1 callersFunctionStorageInCloud
StorageInCloud 将文件上传到云存储并返回 ObjectKey
server/storage/storage.go:181
↓ 1 callersMethodUpload
(ctx context.Context, content io.Reader, opts UploadOptions)
server/storage/oss.go:24
↓ 1 callersFunctionWithReqId
WithReqId 将请求ID添加到上下文中 返回一个包含该请求ID的新上下文
server/util/reqid.go:58
↓ 1 callersFunctionaddLineNumbersBlockFor
(inputHtml, firstLineIndex)
web/src/utils/highlightjs-line-numbers.js:160
↓ 1 callersFunctionaddStyles
()
web/src/utils/highlightjs-line-numbers.js:124
↓ 1 callersFunctionasync
(func)
web/src/utils/highlightjs-line-numbers.js:251
↓ 1 callersFunctionduplicateMultilineNode
* Method for fix multi-line elements implementation in highlight.js * @param {HTMLElement} element
web/src/utils/highlightjs-line-numbers.js:225
↓ 1 callersFunctionduplicateMultilineNodes
* Recursive method for fix multi-line elements implementation in highlight.js * Doing deep passage on child nodes. * @param {HTMLElement} element
web/src/utils/highlightjs-line-numbers.js:204
↓ 1 callersFunctionedgeGetSelectedCodeLines
(selection)
web/src/utils/highlightjs-line-numbers.js:41
↓ 1 callersFunctionensureValidLimits
确保所有限制值都是有效的
server/util/limit.go:78
↓ 1 callersFunctiongetHljsLnTable
(hljsLnDomElt)
web/src/utils/highlightjs-line-numbers.js:28
↓ 1 callersFunctiongetLinesCount
(text)
web/src/utils/highlightjs-line-numbers.js:247
↓ 1 callersFunctionisHljsLnCodeDescendant
(domElt)
web/src/utils/highlightjs-line-numbers.js:17
↓ 1 callersMethodisOnceDocument
isOnceDocument 检查文档是否是一次性文档
server/db/paste.go:172
↓ 1 callersFunctionlineNumbersInternal
(element, options)
web/src/utils/highlightjs-line-numbers.js:146
↓ 1 callersFunctionmarkdownPack
(html)
web/src/utils/markdown-it.js:35
↓ 1 callersFunctionpreToSegment
(html)
web/src/utils/markdown-it.js:40
↓ 1 callersFunctionwithLogger
withLogger 将一个 *logrus.Entry 实例添加到 context 中,并返回一个新的 context
server/util/logger.go:42
FunctionEnsureWithLogger
EnsureWithLogger 确保 context 中存在一个 *logrus.Entry 实例 如果 context 中已存在 logger,则直接返回该 context 和 logger 如果不存在,则创建一个新的 logger(包含请求 ID),将其添加到 context 中 然后返回新的
server/util/logger.go:50
MethodGet
Get 方法根据提供的键和密码检索相应的 PasteEntry
server/db/paste.go:137
MethodGetCollection
()
server/db/paste.go:28
MethodGetCollection
GetCollection 返回 MongoDB 的集合
server/db/paste.go:110
FunctionGetLogger
(ctx context.Context)
server/util/logger.go:30
FunctionGetMongoClient
GetMongoClient 返回全局MongoDB客户端实例
server/db/paste.go:44
MethodGetPaste
获取分享内容
server/service/service.go:219
FunctionGetReqID
GetReqID 从给定的上下文中获取请求ID 如果上下文中没有请求ID,生成并返回一个新的请求ID
server/util/reqid.go:39
FunctionGetServerHost
GetServerHost 尝试替换原本从配置文件中设置的 服务器地址的端口号
server/util/service.go:53
MethodGetSignedURL
GetSignedURL 生成带签名的临时访问 URL
server/storage/tencent.go:151
FunctionInit
注册路由
server/router/router.go:12
FunctionInitializeLimits
InitializeLimits 从 Viper 加载 limit 配置
server/util/limit.go:45
FunctionInitializeStorage
InitializeStorage 初始化存储配置
server/storage/storage.go:57
FunctionLoadConfig
加载配置
server/util/service.go:16
FunctionNewPaste
(ctx context.Context, viper_ *viper.Viper)
server/db/paste.go:50
MethodPostPaste
创建分享内容
server/service/service.go:23
MethodPostPasteOnce
创建一次性分享内容
server/service/service.go:131
FunctionRandString
RandString 返回一个指定长度的随机字符串
server/util/util.go:28
FunctionReqID
中间件,用于为每个请求生成或提取唯一的请求 ID。
server/middleware/logger.go:29
FunctionRunServer
启动服务器
server/util/service.go:29
MethodSet
Set 方法将新的 PasteEntry 存储到 MongoDB 中,并返回生成的唯一键
server/db/paste.go:115
MethodSetLifeCycle
(ctx context.Context)
server/storage/oss.go:25
FunctionShutdownServer
ShutdownServer 优雅地关闭服务器,等待当前活动连接完成
server/util/service.go:38
FunctionString2bcrypt
String2bcryt 返回输入字符串的 bcrypt 哈希值
server/util/util.go:53
MethodUpload
(ctx context.Context, content io.Reader, opts UploadOptions)
server/storage/tencent.go:78
FunctionUploadImages
获取图片
server/storage/storage.go:97
Function_baseUpdate
(object)
web/src/mixins/stateMixin.js:3
FunctionemptyFunc
()
web/src/router/router.js:5
Functioni
(e)
web/src/utils/markdown-it-mermaid.js:36
Functioninit
()
server/util/logger.go:12
Functioninit
(state)
web/src/store/store.js:18
FunctionlineNumbersBlock
(element, options)
web/src/utils/highlightjs-line-numbers.js:138
Functionmain
()
server/main.go:22
FunctionmarkdownItLinkTarget
(md, config)
web/src/utils/markdown-it-links.js:2
FunctionupdateContent
(content)
web/src/mixins/stateMixin.js:6
FunctionupdateKey
(key)
web/src/mixins/stateMixin.js:12
FunctionupdateLangtype
(langtype)
web/src/mixins/stateMixin.js:9
FunctionupdateMode
(state, payload)
web/src/store/store.js:21
FunctionupdateNotFound
(state, payload)
web/src/store/store.js:24
FunctionupdateState
(state, payload)
web/src/store/store.js:27
FunctionupdateView
(view)
web/src/mixins/stateMixin.js:15
Functionuslugify
web/src/utils/markdown-it.js:7