iedc-go/type.go

24 lines
462 B
Go
Raw Normal View History

2017-08-04 08:20:59 +00:00
package hotime
//控制器
2018-11-14 02:31:08 +00:00
type Ctr map[string]Method
2017-08-04 08:20:59 +00:00
type Proj map[string]Ctr
type Router map[string]Proj
2018-11-14 02:31:08 +00:00
type MethodRouter map[string]Method//直接字符串关联函数
type Method func(this *Context)
2017-08-10 10:14:56 +00:00
2017-08-04 08:20:59 +00:00
type CacheIns interface {
2018-04-04 18:44:00 +00:00
//set(key string, value interface{}, time int64)
//get(key string) interface{}
//delete(key string)
2017-08-04 08:20:59 +00:00
Cache(key string, data ...interface{}) *Obj
}
//单条缓存数据
type cacheData struct {
time int64
data interface{}
}