20 lines
259 B
Go
20 lines
259 B
Go
|
package storage
|
||
|
|
||
|
import "gorm.io/gorm"
|
||
|
|
||
|
type Storage struct {
|
||
|
articleApi ArticleApi
|
||
|
}
|
||
|
|
||
|
func NewStorage(db *gorm.DB) *Storage {
|
||
|
return &Storage{
|
||
|
articleApi: &articleApi{
|
||
|
db: db,
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (s *Storage) Article() ArticleApi {
|
||
|
return s.articleApi
|
||
|
}
|