portable

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotProxeusDB = fmt.Errorf("not a Proxeus DB file")

Functions

This section is empty.

Types

type EntityType

type EntityType string
const (
	Settings EntityType = "Settings"
	I18n     EntityType = "I18n"
	Form     EntityType = "Form"
	Workflow EntityType = "Workflow"
	Template EntityType = "Template"
	User     EntityType = "User"
	UserData EntityType = "UserData"
)

func StringToEntityType

func StringToEntityType(str string) EntityType

type ImportExport

type ImportExport struct {
	// contains filtered or unexported fields
}

func NewImportExport

func NewImportExport(auth model.Auth, dbSet *storage.DBSet, dir string) (*ImportExport, error)

NewImportExport creates a configuration to import and export database files

func (*ImportExport) Close

func (ie *ImportExport) Close() error

func (*ImportExport) Export

func (ie *ImportExport) Export(t EntityType, ids ...string) error

Export writes the data from the import export configuration for the specified entity type

func (*ImportExport) Extract

func (ie *ImportExport) Extract(reader io.Reader) error

func (*ImportExport) Import

func (ie *ImportExport) Import(t EntityType) error

Import reads the data from the import export configuration for the specified entity type

func (*ImportExport) InitFilesDB

func (ie *ImportExport) InitFilesDB() error

Initialized the Files DB Make sure the path exists before opening the db. E.g. in import first unpack the zip to the wanted path then open FileDB

func (*ImportExport) Pack

func (ie *ImportExport) Pack() (*os.File, error)

Pack produces and return the handle to a tar file containing the export of the database files

func (*ImportExport) Processed

func (ie *ImportExport) Processed() ProcessedResults

func (*ImportExport) SetSkipExistingOnImport

func (ie *ImportExport) SetSkipExistingOnImport(yes bool)

type ProcessedResults

type ProcessedResults map[EntityType]map[string]string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL