[feat] 新增 GRpController

This commit is contained in:
what 2023-05-22 13:26:49 +08:00
parent 3d522f44dc
commit 5f1a570f09

View File

@ -4,6 +4,7 @@ import (
"net/http" "net/http"
"github.com/samber/do" "github.com/samber/do"
"google.golang.org/grpc"
) )
type Controller interface { type Controller interface {
@ -15,6 +16,10 @@ type Controller interface {
Call(code string, params map[string]any, category ...RouteCategory) (HttpResponse, error) Call(code string, params map[string]any, category ...RouteCategory) (HttpResponse, error)
} }
type GRpController interface {
GetGRpcServiceDesc() grpc.ServiceDesc
}
type BaseController struct { type BaseController struct {
User User User User
Container *do.Injector Container *do.Injector