12345678910111213141516171819 |
- package svc
- import (
- "app.yhyue.com/moapp/jyfs/api/internal/config"
- "app.yhyue.com/moapp/jyfs/rpc/filesystemclient"
- "github.com/tal-tech/go-zero/zrpc"
- )
- type ServiceContext struct {
- Config config.Config
- FileSystem filesystemclient.FileSystem
- }
- func NewServiceContext(c config.Config) *ServiceContext {
- return &ServiceContext{
- Config: c,
- FileSystem: filesystemclient.NewFileSystem(zrpc.MustNewClient(c.FileSystemConf)),
- }
- }
|