mirror of
https://github.com/netbirdio/management-refactor.git
synced 2026-05-22 17:12:59 -07:00
20 lines
448 B
Go
20 lines
448 B
Go
package db
|
|
|
|
import "slices"
|
|
|
|
// Engine represents the db engine to use.
|
|
type Engine string
|
|
|
|
const (
|
|
SqliteStoreEngine Engine = "sqlite"
|
|
PostgresStoreEngine Engine = "postgres"
|
|
MemoryStoreEngine Engine = "memory"
|
|
MysqlStoreEngine Engine = "mysql"
|
|
)
|
|
|
|
var supportedEngines = []Engine{SqliteStoreEngine, PostgresStoreEngine, MysqlStoreEngine}
|
|
|
|
func IsSupportedEngine(engine Engine) bool {
|
|
return slices.Contains(supportedEngines, engine)
|
|
}
|