mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
init commit
This commit is contained in:
23
water/service/service.go
Normal file
23
water/service/service.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"flswld.com/light"
|
||||
"water/dao"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
dao *dao.Dao
|
||||
rpcUserConsumer *light.Consumer
|
||||
// token map
|
||||
// map[token]uid
|
||||
userTokenMap map[string]uint64
|
||||
}
|
||||
|
||||
// 构造函数
|
||||
func NewService(dao *dao.Dao, rpcUserConsumer *light.Consumer) (r *Service) {
|
||||
r = new(Service)
|
||||
r.rpcUserConsumer = rpcUserConsumer
|
||||
r.userTokenMap = make(map[string]uint64)
|
||||
r.dao = dao
|
||||
return r
|
||||
}
|
||||
Reference in New Issue
Block a user