keys.go 690 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package mod
  2. import (
  3. "fmt"
  4. )
  5. const (
  6. pxConf = "conf"
  7. pxUser = "user"
  8. pxRT = "rt"
  9. pxMap = "map"
  10. pxTmp = "tmp"
  11. )
  12. // index user by uid
  13. func kh_user(userId uint64) string {
  14. return fmt.Sprintf("%s:%v", pxUser, userId)
  15. }
  16. // user kicked
  17. func ks_kick(userId uint64) string {
  18. return fmt.Sprintf("%s:kick:%v", pxRT, userId)
  19. }
  20. func kh_user_agent(userId uint64) string {
  21. return fmt.Sprintf("%s:user_agent", pxRT)
  22. }
  23. func kz_agent_user(userId uint64) string {
  24. return fmt.Sprintf("%s:agent_users", pxRT)
  25. }
  26. func kh_user_logic(userId uint64) string {
  27. return fmt.Sprintf("%s:user_logic", pxRT)
  28. }
  29. func kh_logic_user(userId uint64) string {
  30. return fmt.Sprintf("%s:logic_users", pxRT)
  31. }