package
1.3.0
Repository: https://github.com/momeni/clean-arch.git
Documentation: pkg.go.dev

# Functions

AreVersionsCompatible returns true if the given semantic version numbers have the same major version and the minor version of v1 is not older than v2, so it can be said that v1 is backward-compatible with v2.
ForeignSchemaName returns the name of a schema which should be created in the destination database in order to be filled with the foreign tables which are imported from a foreign server which represents the source database with the given major and minor versions.
ForeignServerName returns the name of a foreign server which should be created in order to represent the source database with the given major and minor version numbers within the destination database.
HasTheSameConnectionInfo returns true if and only if both of the `s1` and `s2` schema settings contain the connection information for a common database.
MigrationSchemaName returns the intermediate schema name which is used for storage of a database schema with given major version during a migration operation.
NewInitDB creates an InitDBUseCase instance, using the `ss` schema settings in order to find the target database connection information and also create its schema initializer based on the expected database semantic version.
NewMigrateDB creates a new MigrateDBUseCase instance which uses the `mig` migrator in order to learn about the source configuration file settings.
SchemaName returns the target database schema name for the given major version.

# Structs

InitDBUseCase represents the database initialization use case.
MigrateDBUseCase represents the configuration and database schema migration use cases.

# Interfaces

SchemaSettings represents the database-related settings which should be provided by a configuration file.
Settings interface represents the expectations of the migration use cases from the configuration files contents.

# Type aliases

ConfigFileLoader is a version-independent function type which accepts a configuration file path, reads it entirely, parses it based on its detected version, and finally adapts it to the Settings interface.