mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
13 lines
338 B
Go
13 lines
338 B
Go
package cache
|
|
|
|
import (
|
|
"database/sql/driver"
|
|
)
|
|
|
|
// TODO: implement extendable storage drivers using cache interface (sqlite, duckdb, etc.)
|
|
type Cache[T any] interface {
|
|
CreateIfNotExists(path string) (driver.Connector, error)
|
|
Insert(path string, data ...T) error
|
|
Delete(path string, data ...T) error
|
|
Get(path string) ([]T, error)
|
|
}
|