iris/_examples/project/user/repository.go
Gerasimos (Makis) Maropoulos 4dfd4c53d3
new minor features
2022-04-09 14:51:34 +03:00

15 lines
269 B
Go

package user
import "github.com/username/project/pkg/database"
type Repository interface { // Repo methods here...
}
type repo struct { // Hold database instance here: e.g.
db *database.DB
}
func NewRepository(db *database.DB) Repository {
return &repo{db: db}
}