Documentation ¶
Index ¶
- Variables
- type Engine
- func CheckEngine(dbPath string, createDatabaseIfNotExists bool, dbEngine Engine, ...) (Engine, error)
- func EngineAllowed(dbEngine Engine, allowedEngines []Engine) (Engine, error)
- func EngineFromStringAllowed(dbEngineStr string, allowedEngines []Engine) (Engine, error)
- func LoadEngineFromFile(path string, allowedEngines []Engine) (Engine, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEngineMismatch = errors.New("database engine mismatch")
)
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine string
func CheckEngine ¶
func CheckEngine(dbPath string, createDatabaseIfNotExists bool, dbEngine Engine, allowedEngines []Engine) (Engine, error)
CheckEngine checks if the correct database engine is used. This function stores a so called "database info file" in the database folder or checks if an existing "database info file" contains the correct engine. Otherwise the files in the database folder are not compatible.
func EngineAllowed ¶
EngineAllowed checks if the database engine is allowed.
func EngineFromStringAllowed ¶
EngineFromStringAllowed parses an engine from a string and checks if the database engine is allowed.
Click to show internal directories.
Click to hide internal directories.