splited storage interface in multiple interfaces

This commit is contained in:
Radu Ioan Fericean
2013-08-27 14:48:01 +03:00
parent 1bfaa3a52f
commit 411af6ba74
22 changed files with 192 additions and 97 deletions

View File

@@ -28,7 +28,7 @@ type PostgresStorage struct {
*SQLStorage
}
func NewPostgresStorage(host, port, name, user, password string) (DataStorage, error) {
func NewPostgresStorage(host, port, name, user, password string) (Storage, error) {
db, err := sql.Open("postgres", fmt.Sprintf("host=%s port=%s dbname=%s user=%s password=%s sslmode=disable", host, port, name, user, password))
if err != nil {
return nil, err