feat/modules: 更新模块引用并添加 Redis 配置
- 更新 go.work 文件,添加 modules 引用 - 修改 logic/main.go,增加 Redis 模式监听 - 更新 login/main.go,引入 modules 模块 - 修改 manifest/config/config.yaml,添加 Redis 配置信息
This commit is contained in:
23
modules/blazing/service/demo_goods.go
Normal file
23
modules/blazing/service/demo_goods.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
|
||||
"blazing/modules/blazing/model"
|
||||
)
|
||||
|
||||
type DemoGoodsService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
func NewDemoGoodsService() *DemoGoodsService {
|
||||
return &DemoGoodsService{
|
||||
&cool.Service{
|
||||
Model: model.NewDemoGoods(),
|
||||
ListQueryOp: &cool.QueryOp{
|
||||
|
||||
Join: []*cool.JoinOp{},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
19
modules/blazing/service/demo_sample.go
Normal file
19
modules/blazing/service/demo_sample.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
|
||||
"blazing/modules/blazing/model"
|
||||
)
|
||||
|
||||
type DemoSampleService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
func NewDemoSampleService() *DemoSampleService {
|
||||
return &DemoSampleService{
|
||||
&cool.Service{
|
||||
Model: model.NewDemoSample(),
|
||||
},
|
||||
}
|
||||
}
|
||||
21
modules/blazing/service/demo_test.go
Normal file
21
modules/blazing/service/demo_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
)
|
||||
|
||||
type DemoTestService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
func NewDemoTestService() *DemoTestService {
|
||||
return &DemoTestService{
|
||||
&cool.Service{},
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DemoTestService) GetDemoTestList() (interface{}, error) {
|
||||
// gsvc.SetRegistry(etcd.New(`127.0.0.1:2379`))
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
21
modules/blazing/service/login.go
Normal file
21
modules/blazing/service/login.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
)
|
||||
|
||||
type LoginService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
func NewLoginServiceService() *LoginService {
|
||||
return &LoginService{
|
||||
&cool.Service{},
|
||||
}
|
||||
}
|
||||
|
||||
func (s *LoginService) SaveSessionId(session, userid string) error {
|
||||
// gsvc.SetRegistry(etcd.New(`127.0.0.1:2379`))
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user