|
|
@ -75,8 +75,8 @@ import ( |
|
|
|
"{{.Name}}/internal/server/grpc" |
|
|
|
"{{.Name}}/internal/server/grpc" |
|
|
|
"{{.Name}}/internal/server/http" |
|
|
|
"{{.Name}}/internal/server/http" |
|
|
|
"{{.Name}}/internal/service" |
|
|
|
"{{.Name}}/internal/service" |
|
|
|
"github.com/bilibili/Kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/Kratos/pkg/log" |
|
|
|
"github.com/bilibili/kratos/pkg/log" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
func main() { |
|
|
@ -126,12 +126,12 @@ import ( |
|
|
|
"context" |
|
|
|
"context" |
|
|
|
"time" |
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/bilibili/Kratos/pkg/cache/memcache" |
|
|
|
"github.com/bilibili/kratos/pkg/cache/memcache" |
|
|
|
"github.com/bilibili/Kratos/pkg/cache/redis" |
|
|
|
"github.com/bilibili/kratos/pkg/cache/redis" |
|
|
|
"github.com/bilibili/Kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/Kratos/pkg/database/sql" |
|
|
|
"github.com/bilibili/kratos/pkg/database/sql" |
|
|
|
"github.com/bilibili/Kratos/pkg/log" |
|
|
|
"github.com/bilibili/kratos/pkg/log" |
|
|
|
xtime "github.com/bilibili/Kratos/pkg/time" |
|
|
|
xtime "github.com/bilibili/kratos/pkg/time" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
// Dao dao.
|
|
|
|
// Dao dao.
|
|
|
@ -233,7 +233,7 @@ import ( |
|
|
|
"context" |
|
|
|
"context" |
|
|
|
|
|
|
|
|
|
|
|
"{{.Name}}/internal/dao" |
|
|
|
"{{.Name}}/internal/dao" |
|
|
|
"github.com/bilibili/Kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/kratos/pkg/conf/paladin" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
// Service service.
|
|
|
|
// Service service.
|
|
|
@ -274,7 +274,7 @@ import ( |
|
|
|
|
|
|
|
|
|
|
|
pb "{{.Name}}/api" |
|
|
|
pb "{{.Name}}/api" |
|
|
|
"{{.Name}}/internal/dao" |
|
|
|
"{{.Name}}/internal/dao" |
|
|
|
"github.com/bilibili/Kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/kratos/pkg/conf/paladin" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/golang/protobuf/ptypes/empty" |
|
|
|
"github.com/golang/protobuf/ptypes/empty" |
|
|
|
) |
|
|
|
) |
|
|
@ -321,10 +321,10 @@ import ( |
|
|
|
"net/http" |
|
|
|
"net/http" |
|
|
|
|
|
|
|
|
|
|
|
"{{.Name}}/internal/service" |
|
|
|
"{{.Name}}/internal/service" |
|
|
|
"github.com/bilibili/Kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/Kratos/pkg/log" |
|
|
|
"github.com/bilibili/kratos/pkg/log" |
|
|
|
bm "github.com/bilibili/Kratos/pkg/net/http/blademaster" |
|
|
|
bm "github.com/bilibili/kratos/pkg/net/http/blademaster" |
|
|
|
"github.com/bilibili/Kratos/pkg/net/http/blademaster/middleware/verify" |
|
|
|
"github.com/bilibili/kratos/pkg/net/http/blademaster/middleware/verify" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
var ( |
|
|
@ -425,8 +425,8 @@ message HelloReq { |
|
|
|
import ( |
|
|
|
import ( |
|
|
|
pb "{{.Name}}/api" |
|
|
|
pb "{{.Name}}/api" |
|
|
|
"{{.Name}}/internal/service" |
|
|
|
"{{.Name}}/internal/service" |
|
|
|
"github.com/bilibili/Kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/kratos/pkg/conf/paladin" |
|
|
|
"github.com/bilibili/Kratos/pkg/net/rpc/warden" |
|
|
|
"github.com/bilibili/kratos/pkg/net/rpc/warden" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
// New new a grpc server.
|
|
|
|
// New new a grpc server.
|
|
|
|