// Package util provide some utility functions package util import "modelRT/constants" // GetLevelStrByRdsKey define func to return hierarchical by special redis key func GetLevelStrByRdsKey(key string) string { switch key { case constants.RedisAllGridSetKey: return "grid" case constants.RedisAllZoneSetKey: return "zone" case constants.RedisAllStationSetKey: return "station" case constants.RedisAllCompNSPathSetKey: return "component nspaht" case constants.RedisAllCompTagSetKey: return "component tag" case constants.RedisAllConfigSetKey: return "config" case constants.RedisAllMeasTagSetKey: return "measurement tag" default: return "" } }