Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFSObject ¶
func LoadObjectsFromFiles ¶
func LoadObjectsFromFiles(config *conf.MigrationConfig) ( map[enums.MigrationType][]*migrations.Migration, map[enums.HookType][]*migrations.Hook, []error)
LoadObjectsFromFiles reads migration and hook files from the specified directories.
This function processes files in the given directories to load migration and hook objects. It uses the provided configuration to determine which migrations and hooks should be included, avoiding unnecessary memory usage. If a file contains templates, they are replaced with actual content. For up migration files, an MD5 checksum is generated for the final content (after the templates process).
Notes:
- Files are processed concurrently for better performance.
- Mutexes ensure thread-safe updates to the migration and hook maps.
- Only migrations and hooks matching the configuration criteria are loaded.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.