[feat] add NewBaseController func

This commit is contained in:
what 2023-06-05 14:46:25 +08:00
parent 56a3ee4a9a
commit 310ef2d2c8

View File

@ -129,6 +129,10 @@ func (GRpcBaseController) GetGRpcServiceDesc() *grpc.ServiceDesc {
return nil return nil
} }
func NewBaseController(container *do.Injector) Controller {
return &BaseController{container}
}
func NewHttpBaseController(container *do.Injector, request *http.Request) HttpController { func NewHttpBaseController(container *do.Injector, request *http.Request) HttpController {
return &HttpBaseController{ return &HttpBaseController{
Controller: &BaseController{container}, Controller: &BaseController{container},