Documentation ¶
Index ¶
- func SetConfDir(dir string)
- func SetDB(db *config.DatabaseCfg)
- func SetLogger(l *logrus.Logger)
- type EIOptions
- type ExportData
- func (e *ExportData) Export(ObjType string, id string, recursive bool, level int) error
- func (e *ExportData) Import(overwrite bool, autorename bool) error
- func (e *ExportData) ImportCheck() (*ExportData, error)
- func (e *ExportData) PrependObject(obj *ExportObject)
- func (e *ExportData) UpdateTmpObject()
- type ExportInfo
- type ExportObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetConfDir ¶
func SetConfDir(dir string)
SetConfDir enable load File Filters from anywhere in the our FS.
func SetDB ¶
func SetDB(db *config.DatabaseCfg)
SetDB load database config to load data if needed (used in filters)
Types ¶
type EIOptions ¶
type EIOptions struct { Recursive bool //Export Option AutoRename bool //Import Option AlternateID string //Import Option }
EIOptions options for export and import
type ExportData ¶
type ExportData struct { Info *ExportInfo Objects []*ExportObject // contains filtered or unexported fields }
ExportData the runtime measurement config
func NewExport ¶
func NewExport(info *ExportInfo) *ExportData
NewExport Sets ExportInfo into ExportData
func (*ExportData) Import ¶
func (e *ExportData) Import(overwrite bool, autorename bool) error
Import Imports data from file
func (*ExportData) ImportCheck ¶
func (e *ExportData) ImportCheck() (*ExportData, error)
ImportCheck Checks if object to import is duplicated in the database
func (*ExportData) PrependObject ¶
func (e *ExportData) PrependObject(obj *ExportObject)
PrependObject Appends ExportObject to ExportData if necessary
func (*ExportData) UpdateTmpObject ¶
func (e *ExportData) UpdateTmpObject()
UpdateTmpObject removes duplicated objects from the auxiliar array
Click to show internal directories.
Click to hide internal directories.