22 lines
432 B
Go
22 lines
432 B
Go
package repo
|
|
|
|
import (
|
|
"ai_scheduler/internal/config"
|
|
"ai_scheduler/internal/data/impl"
|
|
"ai_scheduler/internal/pkg/oss"
|
|
)
|
|
|
|
// Repos 聚合所有 Repository
|
|
type Repos struct {
|
|
Session SessionRepo
|
|
OssClient *oss.Client
|
|
}
|
|
|
|
func NewRepos(sessionImpl *impl.SessionImpl, cfg *config.Config) *Repos {
|
|
ossClient, _ := oss.NewClient(cfg.Oss)
|
|
return &Repos{
|
|
Session: NewSessionAdapter(sessionImpl),
|
|
OssClient: ossClient,
|
|
}
|
|
}
|