aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/hsu/hst.go
blob: ed0e557510efc7c3f9a8a900caef79e37852a1f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 }