resource.go 只保留跟 base 包无关的部分接口定义。res_event.go(旧资源事件接口)删除,替换成 res_watcher.go(ResWatcher 相关接口)。新增 di.go,提供依赖注入相关的公共辅助函数。
16 lines
547 B
Go
16 lines
547 B
Go
package contracts
|
|
|
|
import (
|
|
"git.fsdpf.net/go/req"
|
|
)
|
|
|
|
// GetResource 资源;类型定义搬到了 req.GetResource(req 的子包需要用它查资源,不能反过来
|
|
// import contracts),这里保留别名兼容原有引用。
|
|
type GetResource = req.GetResource
|
|
|
|
// MustResource 资源, 没有则抛出错误;类型定义搬到了 req.MustResource,这里保留别名兼容原有引用。
|
|
type MustResource = req.MustResource
|
|
|
|
// GetUser 获取用户
|
|
type GetUser func(uuid string, options ...req.UserRuntimeOption) (req.User, error)
|