forked from rosa/hakurei
This was previously only documented via an unexported function. Signed-off-by: Ophestra <cat@gensokyo.uk>
17 lines
313 B
Go
17 lines
313 B
Go
package main
|
|
|
|
/* keep in sync with hst */
|
|
|
|
const (
|
|
userOffset = 100000
|
|
rangeSize = userOffset / 10
|
|
|
|
identityStart = 0
|
|
identityEnd = appEnd - appStart
|
|
|
|
appStart = rangeSize * 1
|
|
appEnd = appStart + rangeSize - 1
|
|
)
|
|
|
|
func toUser(userid, appid uint32) uint32 { return userid*userOffset + appStart + appid }
|