fusenapi/initalize/service.go

29 lines
813 B
Go
Raw Normal View History

2023-08-14 09:56:06 +00:00
package initalize
import (
"fusenapi/service/repositories"
"github.com/aws/aws-sdk-go/aws/session"
"gorm.io/gorm"
)
type Repositories struct {
2023-09-20 07:21:42 +00:00
ImageHandle repositories.ImageHandle
NewResource repositories.Resource
NewShoppingCart repositories.ShoppingCart
2023-08-14 09:56:06 +00:00
}
type NewAllRepositorieData struct {
GormDB *gorm.DB
BLMServiceUrl *string
AwsSession *session.Session
}
func NewAllRepositories(newData *NewAllRepositorieData) *Repositories {
return &Repositories{
2023-09-20 07:21:42 +00:00
ImageHandle: repositories.NewImageHandle(newData.GormDB, newData.BLMServiceUrl, newData.AwsSession),
NewResource: repositories.NewResource(newData.GormDB, newData.BLMServiceUrl, newData.AwsSession),
NewShoppingCart: repositories.NewShoppingCart(newData.GormDB, newData.BLMServiceUrl, newData.AwsSession),
2023-08-14 09:56:06 +00:00
}
}