Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GoSimplicity/LinkMe
/ functions
Functions
1,482 in github.com/GoSimplicity/LinkMe
⨍
Functions
1,482
◇
Types & classes
383
↓ 76 callers
Function
ErrorWithMessage
ErrorWithMessage 带消息的操作失败返回
pkg/apiresponse/apiresponse.go:150
↓ 44 callers
Method
Set
(ctx context.Context, key string, post domain.Post)
internal/repository/cache/post.go:16
↓ 35 callers
Function
Error
Error 操作失败的返回
pkg/apiresponse/apiresponse.go:140
↓ 33 callers
Function
SuccessWithData
SuccessWithData 带数据的操作成功返回
pkg/apiresponse/apiresponse.go:130
↓ 30 callers
Function
Success
Success 操作成功的返回
pkg/apiresponse/apiresponse.go:120
↓ 29 callers
Method
Get
(ctx context.Context, key string)
internal/repository/cache/post.go:15
↓ 25 callers
Function
requireUser
(ctx *gin.Context)
internal/api/auth.go:9
↓ 24 callers
Method
Create
(ctx context.Context, check Check)
internal/repository/dao/check.go:14
↓ 22 callers
Method
Del
(ctx context.Context, key string)
internal/repository/cache/post.go:17
↓ 18 callers
Method
Limit
Limit true为触发,false为不触发
pkg/limiterp/limit.go:16
↓ 18 callers
Function
WrapBody
WrapBody 是一个中间件,用于包裹业务逻辑函数,自动绑定请求体、处理响应并集中管理错误处理。
pkg/ginp/wrapper.go:10
↓ 17 callers
Method
Count
(ctx context.Context, number string)
internal/repository/cache/sms.go:18
↓ 15 callers
Method
RegisterRoutes
(server *gin.Engine)
internal/api/api.go:26
↓ 14 callers
Function
ErrorWithData
ErrorWithData 带数据的失败返回
pkg/apiresponse/apiresponse.go:145
↓ 12 callers
Method
Consume
Consume 处理Kafka消息,根据不同的表名执行不同的操作
internal/domain/events/es/consumer.go:151
↓ 11 callers
Method
Close
关闭服务
internal/service/lotteryDraw.go:30
↓ 9 callers
Method
Exec
添加redis命令
internal/repository/cache/redis_cmd.go:21
↓ 9 callers
Method
SendMessage
SendMessage 包装后的 SendMessage 方法,用于监控消息发送时间
pkg/samarap/prometheus/prometheus.go:37
↓ 8 callers
Function
ApiData
(c *gin.Context, code int, data interface{}, message string)
pkg/apiresponse/apiresponse.go:110
↓ 8 callers
Method
Create
(ctx context.Context, post domain.Post)
internal/service/post.go:19
↓ 8 callers
Method
Run
()
internal/job/scheduler.go:52
↓ 8 callers
Method
refreshCache
(options ...interface{})
internal/repository/post.go:298
↓ 7 callers
Method
Delete
(ctx context.Context, postId uint, uid int64)
internal/repository/dao/post.go:28
↓ 7 callers
Method
UpdateStatus
(ctx context.Context, postId uint, uid int64, status uint8)
internal/repository/dao/post.go:23
↓ 6 callers
Method
GetPostById
(ctx context.Context, postId uint, uid int64)
internal/service/post.go:23
↓ 6 callers
Method
Stop
()
internal/job/scheduler.go:56
↓ 6 callers
Function
UnauthorizedErrorWithDetails
UnauthorizedErrorWithDetails 带详细数据和消息的未认证返回
pkg/apiresponse/apiresponse.go:210
↓ 6 callers
Method
afterCallback
afterCallback 是数据库操作后的回调,用于记录操作时间并更新 Prometheus 指标
pkg/gormp/prometheus/prometheus.go:84
↓ 6 callers
Method
beforeCallback
beforeCallback 是数据库操作前的回调,用于记录开始时间
pkg/gormp/prometheus/prometheus.go:76
↓ 5 callers
Method
Delete
(ctx context.Context, postId uint, uid int64)
internal/service/post.go:27
↓ 5 callers
Method
Len
Len 返回队列的长度
pkg/priorityqueue/priority_queue.go:33
↓ 5 callers
Function
NewSearchDAO
NewSearchDAO 创建并返回一个新的 SearchDAO 实例
internal/repository/dao/search.go:95
↓ 5 callers
Method
Update
(ctx context.Context, post domain.Post)
internal/service/post.go:20
↓ 5 callers
Method
emptyKey
(key string)
internal/repository/cache/post.go:472
↓ 5 callers
Method
getCurrentTime
()
internal/repository/dao/interactive.go:85
↓ 5 callers
Method
pubKey
(key string)
internal/repository/cache/post.go:468
↓ 5 callers
Method
pubListKey
(key string)
internal/repository/cache/post.go:464
↓ 4 callers
Method
FindByID
(ctx context.Context, id int64)
internal/repository/dao/user.go:27
↓ 4 callers
Function
GenRandomCode
GenRandomCode 生成随机数
utils/sms.go:9
↓ 4 callers
Method
GetById
(ctx context.Context, postId uint, uid int64)
internal/repository/dao/post.go:24
↓ 4 callers
Method
GetLotteryDrawByID
(ctx context.Context, id int)
internal/service/lotteryDraw.go:20
↓ 4 callers
Method
GetSecondKillEventByID
(ctx context.Context, id int)
internal/service/lotteryDraw.go:26
↓ 4 callers
Method
InputUser
(ctx context.Context, user UserSearch)
internal/repository/dao/search.go:44
↓ 4 callers
Function
InternalServerErrorWithDetails
InternalServerErrorWithDetails 带详细数据和消息的服务器内部错误返回
pkg/apiresponse/apiresponse.go:220
↓ 4 callers
Method
ReleaseLock
(ctx context.Context, number string)
internal/repository/sms.go:31
↓ 4 callers
Method
Update
查找当前时刻以前,发送失败的logs,后续需要重新发送
internal/repository/dao/sms.go:13
↓ 4 callers
Method
UpdateLotteryDrawStatus
(ctx context.Context, id int, status string)
internal/repository/dao/lotteryDraw.go:27
↓ 4 callers
Method
UpdateSecondKillEventStatus
(ctx context.Context, id int, status string)
internal/repository/dao/lotteryDraw.go:29
↓ 4 callers
Function
WrapQuery
(bizFn func(ctx *gin.Context, req Req) (Result, error))
pkg/ginp/wrapper.go:53
↓ 4 callers
Method
createIndex
CreateIndex 创建一个新的index, 可指定mapping属性
internal/repository/dao/search.go:122
↓ 4 callers
Function
decodeEventDataToPost
decodeEventDataToPosts 解析事件数据为 Post 结构体
internal/domain/events/es/process_util.go:142
↓ 4 callers
Function
decodeEventDataToUser
decodeEventDataToUser 解析事件数据为 User 结构体
internal/domain/events/es/process_util.go:162
↓ 4 callers
Method
flushBuffer
()
internal/domain/events/es/process_util.go:73
↓ 4 callers
Function
generateLotteryDrawKey
generateLotteryDrawKey 生成抽奖活动的缓存键
internal/repository/cache/lotteryDraw.go:337
↓ 4 callers
Function
generateSecondKillEventKey
generateSecondKillEventKey 生成秒杀活动的缓存键
internal/repository/cache/lotteryDraw.go:342
↓ 4 callers
Method
listKey
(key string)
internal/repository/cache/post.go:460
↓ 4 callers
Method
roleFromDAO
roleFromDAO 将DAO模型转换为领域模型
internal/repository/role.go:108
↓ 4 callers
Method
toDomainRelationSlice
(relations []dao.Relation)
internal/repository/relation.go:143
↓ 4 callers
Function
toDomainUser
toDomainUser 将dao层对象转为领域层对象
internal/repository/user.go:207
↓ 4 callers
Method
updateRelationCount
updateRelationCount 更新关注或粉丝计数器
internal/repository/dao/relation.go:188
↓ 4 callers
Method
withLocalLock
工具函数
internal/repository/cache/history.go:172
↓ 3 callers
Method
AssignRoleToUser
(ctx context.Context, userId int, roleIds []int, menuIds []int, apiIds []int)
internal/service/permission.go:12
↓ 3 callers
Function
BadRequestError
BadRequestError 参数错误的失败返回
pkg/apiresponse/apiresponse.go:200
↓ 3 callers
Method
Enqueue
Enqueue 添加一个元素
pkg/priorityqueue/priority_queue.go:72
↓ 3 callers
Method
FindByUsername
(ctx context.Context, username string)
internal/repository/dao/user.go:28
↓ 3 callers
Function
FromDomainSlicePost
FromDomainSlicePost 将dao层对象转为领域层对象
pkg/change/change.go:60
↓ 3 callers
Method
Get
(ctx context.Context, postId uint)
internal/service/interactive.go:20
↓ 3 callers
Method
GetCache
(ctx context.Context, key string)
internal/repository/cache/check.go:16
↓ 3 callers
Method
GetLotteryDraw
GetLotteryDraw 从缓存中获取指定ID的抽奖活动
internal/repository/cache/lotteryDraw.go:69
↓ 3 callers
Method
GetMoreCommentsReply
(ctx context.Context, rootId, maxId, limit int64)
internal/service/comment.go:25
↓ 3 callers
Method
GetSecondKillEvent
GetSecondKillEvent 从缓存中获取指定ID的秒杀活动
internal/repository/cache/lotteryDraw.go:186
↓ 3 callers
Method
Insert
(ctx context.Context, log VCodeSmsLog)
internal/repository/dao/sms.go:11
↓ 3 callers
Method
ListPublishPosts
(ctx context.Context, pagination domain.Pagination)
internal/service/post.go:25
↓ 3 callers
Method
ProducePublishEvent
(evt PublishEvent)
internal/domain/events/publish/producer.go:13
↓ 3 callers
Method
Release
(ctx context.Context, jobId int64)
internal/repository/dao/sql_job.go:21
↓ 3 callers
Method
SendCode
(ctx context.Context, number string)
internal/repository/sms.go:32
↓ 3 callers
Method
SetCache
(ctx context.Context, key string, check domain.Check, ttl time.Duration)
internal/repository/cache/check.go:17
↓ 3 callers
Method
SetNX
(ctx context.Context, number string, value interface{}, expiration time.Duration)
internal/repository/cache/sms.go:16
↓ 3 callers
Function
ToDomainPost
ToDomainPost 将dao层转化为领域层
pkg/change/change.go:87
↓ 3 callers
Method
VerifyPassword
VerifyPassword 验证密码是否匹配
internal/domain/user.go:87
↓ 3 callers
Function
WithAsyncCancel
(ctx context.Context, cancel context.CancelFunc, fn func() error)
pkg/general/general.go:7
↓ 3 callers
Method
assignAPIPermissions
assignAPIPermissions 分配API权限
internal/repository/dao/permission.go:242
↓ 3 callers
Method
assignMenuPermissions
assignMenuPermissions 分配菜单权限
internal/repository/dao/permission.go:218
↓ 3 callers
Function
convertToDAOParticipant
convertToDAOParticipant 将 domain.Participant 转换为 dao.Participant
internal/repository/lotteryDraw.go:334
↓ 3 callers
Function
convertToDomainLotteryDraws
convertToDomainLotteryDraws 将 dao.LotteryDraw 列表转换为 domain.LotteryDraw 列表
internal/repository/lotteryDraw.go:286
↓ 3 callers
Function
convertToDomainSecondKillEvents
convertToDomainSecondKillEvents 将 dao.SecondKillEvent 列表转换为 domain.SecondKillEvent 列表
internal/repository/lotteryDraw.go:323
↓ 3 callers
Function
createMockElasticsearchClient
辅助函数,用于创建一个模拟的Elasticsearch客户端,便于测试
internal/repository/search_test.go:21
↓ 3 callers
Function
createMockLogger
辅助函数,用于创建一个模拟的Zap日志记录器,这里简单返回一个空的实现,根据实际情况可替换为真实日志记录器或更完善的模拟
internal/repository/search_test.go:41
↓ 3 callers
Method
deleteIndex
deleteIndex 根据索引名称和文档 ID 删除 Elasticsearch 中的文档
internal/repository/dao/search.go:492
↓ 3 callers
Method
getCurrentTime
getCurrentTime 获取当前时间戳(毫秒)
internal/repository/dao/relation.go:63
↓ 3 callers
Function
getLockedKey
(number string)
internal/repository/cache/sms.go:41
↓ 3 callers
Method
key
(key string)
internal/repository/cache/post.go:456
↓ 3 callers
Method
menusFromDAO
menusFromDAO 批量转换菜单列表
internal/repository/menu.go:118
↓ 3 callers
Function
randomInt
randomInt 生成 min 到 max 之间的随机整数,用于随机化 TTL
internal/repository/cache/check.go:180
↓ 3 callers
Function
toDomainCheck
toDomainCheck 将 dao.Check 转换为 domain.Check
internal/repository/check.go:92
↓ 3 callers
Method
toDomainComment
toDomainComment 将DAO评论转换为领域模型评论
internal/repository/comment.go:139
↓ 2 callers
Method
AddParticipant
(ctx context.Context, model Participant)
internal/repository/dao/lotteryDraw.go:24
↓ 2 callers
Method
AddUserOperationLog
AddUserOperationLog 添加用户验证码行为日志
internal/repository/sms.go:66
↓ 2 callers
Method
AssignRole
(ctx context.Context, roleId int, menuIds []int, apiIds []int)
internal/service/permission.go:11
↓ 2 callers
Method
AssignRoleToUsers
(ctx context.Context, userIds []int, roleIds []int, menuIds []int, apiIds []int)
internal/service/permission.go:13
next →
1–100 of 1,482, ranked by callers