MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / randomToken

Function randomToken

internal/serverapi/users.go:664–670  ·  view source on GitHub ↗
(size int)

Source from the content-addressed store, hash-verified

662}
663
664func randomToken(size int) string {
665 buf := make([]byte, size)
666 if _, err := rand.Read(buf); err != nil {
667 return fmt.Sprintf("pulse-secret-%d", time.Now().UnixNano())
668 }
669 return fmt.Sprintf("%x", buf)
670}
671
672func supportedProtocol(value string) bool {
673 switch value {

Callers 8

handleSetupMethod · 0.70
handleUsersMethod · 0.70
handleUserInboundsMethod · 0.70
handleUserCredentialsMethod · 0.70
syncUserInboundsMethod · 0.70
handleInboundUsersMethod · 0.70
generateGroupSecretFunction · 0.70

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected