MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / generateToken

Function generateToken

agent/app/service/agents_utils.go:1605–1611  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1603}
1604
1605func generateToken() string {
1606 bytes := make([]byte, 24)
1607 if _, err := rand.Read(bytes); err != nil {
1608 return ""
1609 }
1610 return hex.EncodeToString(bytes)
1611}
1612
1613func asyncReportAIProviderInstall(provider string) {
1614 if global.CONF.Base.Mode != "stable" || provider == "" {

Callers 2

CreateMethod · 0.85
ResetTokenMethod · 0.85

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected