Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/Tp0t-Team/Tp0tOJ
/ functions
Functions
269 in github.com/Tp0t-Team/Tp0tOJ
⨍
Functions
269
◇
Types & classes
162
↓ 42 callers
Method
WriteHeader
(status int)
server/services/gzip.go:24
↓ 25 callers
Method
Write
(b []byte)
server/services/gzip.go:29
↓ 20 callers
Method
Set
(s string)
server/cli/load/load.go:139
↓ 17 callers
Method
CheckPass
()
server/services/types/types.go:45
↓ 10 callers
Method
Write
(p []byte)
server/cli/prepare/prepare.go:45
↓ 9 callers
Function
lengthLimit
(data string, min int, max int)
server/services/types/types.go:18
↓ 7 callers
Method
String
()
server/cli/load/load.go:128
↓ 7 callers
Function
sudoCopy
(src string, dst string)
server/cli/prepare/prepare.go:78
↓ 6 callers
Method
MakeAvatarUrl
()
server/entity/user.go:24
↓ 4 callers
Function
DisableReplica
(replicaId uint64, outsideTX *gorm.DB, cb func(status bool))
server/services/database/resolvers/replica.go:244
↓ 4 callers
Function
FindChallengeById
(id uint64)
server/services/database/resolvers/challenge.go:26
↓ 4 callers
Method
MutateChallenge
AddChallenge(challengeId uint64, originScore uint64)
server/utils/rankCache.go:27
↓ 4 callers
Function
TarAddFile
(file string, archiveFile string, tarArchive *tar.Writer)
server/cli/prepare/prepare.go:504
↓ 4 callers
Method
refreshRank
(index int)
server/utils/rank/timelineRankCache.go:182
↓ 3 callers
Function
DeleteReplicaAllocByReplicaId
(replicaId uint64, outsideTX *gorm.DB)
server/services/database/resolvers/replicaAlloc.go:119
↓ 3 callers
Function
FindAllSubmitByChallengeId
(challengeId uint64)
server/services/database/resolvers/submit.go:32
↓ 3 callers
Method
GetScore
GetScore(challengeId uint64, count uint64, dynamic bool) uint64
server/utils/scoreCalc.go:5
↓ 3 callers
Method
Load
WarmUp() error
server/utils/rankCache.go:31
↓ 3 callers
Method
RecoverTimer
(userId uint64, clock *time.Timer)
server/services/database/resolvers/replica.go:396
↓ 3 callers
Function
help
()
server/cli/cli.go:14
↓ 3 callers
Function
optionalUint
(v *uint64)
server/cli/export/export.go:61
↓ 3 callers
Function
originCheck
(r *http.Request)
server/services/grapgql.go:62
↓ 3 callers
Function
passwordHash
(password string)
server/services/user/mutation.go:68
↓ 2 callers
Method
AddChallenge
(challengeId uint64, originScore uint64)
server/utils/rank/ramRankCache.go:66
↓ 2 callers
Function
AddReplica
(challengeId uint64, outsideTX *gorm.DB, cb func(status bool))
server/services/database/resolvers/replica.go:65
↓ 2 callers
Function
AddReplicaAlloc
(replicaId uint64, userId uint64, outsideTX *gorm.DB)
server/services/database/resolvers/replicaAlloc.go:87
↓ 2 callers
Method
AddUser
(userId uint64)
server/utils/rank/ramRankCache.go:59
↓ 2 callers
Function
DeleteReplicaByChallengeId
(challengeId uint64, outsideTX *gorm.DB, cb func(status bool))
server/services/database/resolvers/replica.go:311
↓ 2 callers
Function
FindReplicaAllocByUserIdAndChallengeId
(userId uint64, challengeId uint64, outsideTX *gorm.DB)
server/services/database/resolvers/replicaAlloc.go:25
↓ 2 callers
Function
FindUser
(id uint64)
server/services/database/resolvers/user.go:51
↓ 2 callers
Function
GenerateAgentScript
(masterIP string, k3sExec string)
server/cli/prepare/prepare.go:533
↓ 2 callers
Method
GetIncrementScore
(score uint64, index uint64)
server/utils/scoreCalc.go:6
↓ 2 callers
Method
GetUserScore
(userId uint64)
server/utils/rankCache.go:23
↓ 2 callers
Method
MutateUser
AddUser(userId uint64)
server/utils/rankCache.go:25
↓ 2 callers
Method
ToNodeConfig
()
server/services/types/types.go:258
↓ 2 callers
Function
createDefaultUser
()
server/services/database/database.go:44
↓ 2 callers
Function
createTables
any database error log should be handle and log out inside resolvers, should not return to caller
server/services/database/database.go:33
↓ 2 callers
Function
getOrigin
()
server/services/grapgql.go:54
↓ 2 callers
Function
lengthLimit
(data string, min int, max int)
server/cli/load/load.go:37
↓ 2 callers
Function
loadDockerState
(rd io.Reader)
server/services/kube/kube.go:432
↓ 2 callers
Function
loadTemplate
(file string, defaultText string)
server/utils/email/email.go:44
↓ 2 callers
Function
makeToken
()
server/services/database/resolvers/resetToken.go:37
↓ 2 callers
Method
refreshRank
()
server/utils/rank/ramRankCache.go:130
↓ 2 callers
Method
submitImpl
(userId uint64, challengeId uint64, stamp time.Time)
server/utils/rank/ramRankCache.go:81
↓ 2 callers
Function
usernameFilter
(name string)
server/services/admin/writeUp.go:22
↓ 1 callers
Function
AddBulletin
(title string, content string, style string, topping bool)
server/services/database/resolvers/bulletin.go:23
↓ 1 callers
Method
Append
(frame *TimeFrame)
server/utils/rank/timelineRankCache.go:111
↓ 1 callers
Function
BehaviorAllocReplica
(challenge uint64, user uint64, flag string, actionTime time.Time, outsideTX *gorm.DB)
server/services/database/resolvers/behavior.go:11
↓ 1 callers
Function
BehaviorComplete
(challenge uint64, user uint64, flag string, actionTime time.Time, outsideTX *gorm.DB)
server/services/database/resolvers/behavior.go:51
↓ 1 callers
Method
Chart
(topN uint64)
server/utils/rankCache.go:33
↓ 1 callers
Function
CheckAdminByUserId
(userId uint64)
server/services/database/resolvers/user.go:78
↓ 1 callers
Function
CheckSubmitCorrectByUserIdAndChallengeId
(userId uint64, challengeId uint64, outsideTX *gorm.DB)
server/services/database/resolvers/submit.go:18
↓ 1 callers
Function
ConfigK3SRegistry
(masterIP string, registryUsername string, registryPassword string)
server/cli/prepare/prepare.go:169
↓ 1 callers
Function
CreateCert
(masterIP string)
server/cli/prepare/prepare.go:319
↓ 1 callers
Function
CreateDefaultConfig
(masterIP string, registryUsername string, registryPassword string, dsn string)
server/cli/prepare/prepare.go:435
↓ 1 callers
Function
DeleteReplicaById
(replicaId uint64, cb func(status bool))
server/services/database/resolvers/replica.go:439
↓ 1 callers
Function
DeleteReplicaByUserId
(userId uint64)
server/services/database/resolvers/replica.go:408
↓ 1 callers
Function
DeleteSubmitsByChallengeId
(challengeId uint64, outsideTX *gorm.DB)
server/services/database/resolvers/submit.go:232
↓ 1 callers
Method
DeleteTimer
(userId uint64)
server/services/database/resolvers/replica.go:385
↓ 1 callers
Function
DownloadBinary
()
server/cli/prepare/prepare.go:253
↓ 1 callers
Function
EnableReplica
(replicaId uint64, outsideTX *gorm.DB, cb func(status bool))
server/services/database/resolvers/replica.go:132
↓ 1 callers
Function
FindChallengeByIdInTX
(id uint64, outsideTX *gorm.DB)
server/services/database/resolvers/challenge.go:38
↓ 1 callers
Function
FindChallengeByName
(name string)
server/services/database/resolvers/challenge.go:65
↓ 1 callers
Function
FindReplicaAllocByUserIdAndReplicaId
(userId uint64, replicaId uint64, outsideTX *gorm.DB)
server/services/database/resolvers/replicaAlloc.go:56
↓ 1 callers
Function
FindReplicaByChallengeIdInTX
(challengeId uint64, outsideTX *gorm.DB)
server/services/database/resolvers/replica.go:35
↓ 1 callers
Function
FindReplicaById
(id uint64, outsideTX *gorm.DB)
server/services/database/resolvers/replica.go:50
↓ 1 callers
Function
FindUserInTX
(id uint64, outsideTX *gorm.DB)
server/services/database/resolvers/user.go:63
↓ 1 callers
Function
GenerateStartScript
(postgres bool, dbUsername string, dbPassword string)
server/cli/prepare/prepare.go:800
↓ 1 callers
Method
GetCurrentScores
()
server/utils/rankCache.go:29
↓ 1 callers
Method
GetDeltaScoreForUser
(oldScore uint64, newScore uint64, index uint64)
server/utils/scoreCalc.go:7
↓ 1 callers
Method
GetRank
()
server/utils/rankCache.go:21
↓ 1 callers
Method
GetUserRank
(userId uint64)
server/utils/rankCache.go:22
↓ 1 callers
Function
GetWriteUpInfos
()
server/services/admin/writeUp.go:178
↓ 1 callers
Function
Gzip
(next http.Handler)
server/services/gzip.go:33
↓ 1 callers
Function
InstallK3S
(masterIP string, k3sExec string)
server/cli/prepare/prepare.go:90
↓ 1 callers
Function
K8sPodAlloc
(replicaId uint64, containerName string, imgLabel string, servicePorts []corev1.ServicePort, flag string)
server/services/kube/kube.go:154
↓ 1 callers
Function
K8sPodDestroy
(replicaId uint64, containerName string)
server/services/kube/kube.go:298
↓ 1 callers
Method
MutateChallenge
(challengeId uint64, state bool, dynamic bool, baseScore uint64)
server/utils/rank/timelineRankCache.go:256
↓ 1 callers
Method
MutateUser
MutateUser @state: true -> user is valid , false -> user is invalid
server/utils/rank/timelineRankCache.go:240
↓ 1 callers
Function
NewFileCache
(filename string)
server/utils/rank/timelineRankCache.go:80
↓ 1 callers
Method
NewTimer
(userId uint64)
server/services/database/resolvers/replica.go:358
↓ 1 callers
Method
NewTimer
(userId uint64)
server/services/user/mutation.go:27
↓ 1 callers
Function
Parse
(config *utils.Config)
server/utils/configure/configParser.go:14
↓ 1 callers
Function
PrepareRegistry
(masterIP string, registryUsername string, registryPassword string)
server/cli/prepare/prepare.go:671
↓ 1 callers
Method
PrintProgress
()
server/cli/prepare/prepare.go:52
↓ 1 callers
Method
Reset
(ctx context.Context, args struct{ Input types.ResetInput })
server/services/user/mutation.go:207
↓ 1 callers
Method
SetCalculator
(calculator ScoreCalculator)
server/utils/rankCache.go:20
↓ 1 callers
Method
Submit
(userId uint64, challengeId uint64, stamp time.Time)
server/utils/rankCache.go:28
↓ 1 callers
Method
ToServicePort
()
server/services/types/types.go:279
↓ 1 callers
Function
addUser
(info Item)
server/cli/load/load.go:82
↓ 1 callers
Function
autoPortSetLoad
()
server/services/kube/kube.go:111
↓ 1 callers
Function
autoPortSetSave
()
server/services/kube/kube.go:93
↓ 1 callers
Function
checkChallengeCategory
(str string)
server/services/types/types.go:178
↓ 1 callers
Function
checkChallengeState
(str string)
server/services/types/types.go:182
↓ 1 callers
Method
checkPass
()
server/cli/load/load.go:46
↓ 1 callers
Function
checkRole
(str string)
server/services/types/types.go:122
↓ 1 callers
Function
checkUserState
(str string)
server/services/types/types.go:126
↓ 1 callers
Function
createApolloProvider
()
app/src/plugins/vue-apollo.ts:17
↓ 1 callers
Method
curve
(baseScore uint64, count uint64)
server/utils/calculator/baseCalculator.go:10
↓ 1 callers
Function
getIP
var CSRFMiddleware func(http.Handler) http.Handler
server/services/grapgql.go:46
next →
1–100 of 269, ranked by callers