th7/db/dummy.go

21 lines
280 B
Go
Raw Normal View History

2022-11-12 14:20:29 +00:00
package db
import (
"fmt"
)
type DummyAdapter struct {
}
2022-11-12 16:22:55 +00:00
func NewDummyAdapter() (*DummyAdapter, error) {
2022-11-12 14:20:29 +00:00
return &DummyAdapter{}, nil
}
func (d *DummyAdapter) Close() {
fmt.Println("Closing DB ...")
}
2022-11-12 16:22:55 +00:00
func (d *DummyAdapter) Save() {
2022-11-12 14:20:29 +00:00
fmt.Println("Saving data to DB ...")
}