Documentation
¶
Index ¶
Constants ¶
View Source
const ( //SortAsc - for method GetTableImage SortAsc = 0 //SortDesc - for method GetTableImage SortDesc = 1 )
View Source
const ( //ClearMethodTruncate - clears table using: TRUNCATE table //Do not use with transaction because of https://dev.mysql.com/doc/refman/5.5/en/implicit-commit.html ClearMethodTruncate = 0 //ClearMethodNoClear - do not clear table ClearMethodNoClear = 1 //ClearMethodDeleteAll - clears table using: DELETE FROM table ClearMethodDeleteAll = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageProvider ¶
type ImageProvider interface { Parse(interface{}) (Image, error) CanParse(source interface{}) bool }
ImageProvider - transformer of raw input to Image
type Installer ¶
type Installer interface { InstallImage(Image) error GetTableRowsCount(string) (int64, error) GetTableImage(string, ...interface{}) (Image, error) WithTransaction() error Rollback() error SetClearMethod(int) Installer }
Installer - executes requests based in Image structure in real DB
type InstallerConfig ¶
type InstallerConfig struct { //Engine for installing dumps, located in /installers/ Type string //DSN string for database ConnString string //How to clear tables before installing dump ClearMethod int //Check connection when creating installer instance DisableConnCheck bool }
InstallerConfig - config fo DB
Click to show internal directories.
Click to hide internal directories.