MCPcopy Create free account
hub / github.com/astercloud/aster / getScope

Function getScope

examples/session/main.go:261–275  ·  view source on GitHub ↗

辅助函数:获取状态作用域

(key string)

Source from the content-addressed store, hash-verified

259
260// 辅助函数:获取状态作用域
261func getScope(key string) string {
262 if session.IsAppKey(key) {
263 return "APP"
264 }
265 if session.IsUserKey(key) {
266 return "USER"
267 }
268 if session.IsTempKey(key) {
269 return "TEMP"
270 }
271 if session.IsSessionKey(key) {
272 return "SESSION"
273 }
274 return "UNKNOWN"
275}

Callers 1

Calls 4

IsAppKeyFunction · 0.92
IsUserKeyFunction · 0.92
IsTempKeyFunction · 0.92
IsSessionKeyFunction · 0.92

Tested by

no test coverage detected