th7/db/dummy.go

22 lines
311 B
Go
Raw Normal View History

2022-11-12 14:20:29 +00:00
package db
import (
"fmt"
"th7/data/core"
2022-11-12 14:20:29 +00:00
)
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 ...")
}
func (d *DummyAdapter) Save([]core.Channel) {
2022-11-12 14:20:29 +00:00
fmt.Println("Saving data to DB ...")
}