Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Export action.GTSAction = func(ctx context.Context) error { var state state.State dbConn, err := bundb.NewBunDBService(ctx, &state) if err != nil { return fmt.Errorf("error creating dbservice: %s", err) } state.DB = dbConn exporter := trans.NewExporter(dbConn) path := config.GetAdminTransPath() if path == "" { return errors.New("no path set") } if err := exporter.ExportMinimal(ctx, path); err != nil { return err } return dbConn.Stop(ctx) }
Export exports info from the database into a file
View Source
var Import action.GTSAction = func(ctx context.Context) error { var state state.State dbConn, err := bundb.NewBunDBService(ctx, &state) if err != nil { return fmt.Errorf("error creating dbservice: %s", err) } state.DB = dbConn importer := trans.NewImporter(dbConn) path := config.GetAdminTransPath() if path == "" { return errors.New("no path set") } if err := importer.Import(ctx, path); err != nil { return err } return dbConn.Stop(ctx) }
Import imports info from a file into the database
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.